Fix IPAL19670(Qt4 porting: Selection filters library - Unexpected error message).

This commit is contained in:
akl 2008-06-06 11:19:10 +00:00
parent 4c544c9207
commit fb78ee1007

View File

@ -436,7 +436,8 @@ bool SMESHGUI_FilterLibraryDlg::onApply()
aResult = true;
} else if (myMode == EDIT || myMode == ADD_TO) {
SMESH::Filter_var aFilter = createFilter();
if (!myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
if (!myListBox->selectedItems().empty() &&
!myLibrary->Replace(myCurrFilterName.toLatin1().constData(),
myName->text().toLatin1().constData(),
aFilter.in())) {
SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"),