diff --git a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx index 074f2d3e3..ce055c5b5 100644 --- a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx @@ -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"),