From: eap Date: Thu, 24 Apr 2014 14:23:09 +0000 (+0400) Subject: IPLA 52416: TC7.4.0: "Remove" button in "Union of triangles" dialog is active if... X-Git-Tag: V7_4_0rc1~30 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=70e4ab70fb3d35f26d8979620fdb5e2e167250a9;ds=sidebyside IPLA 52416: TC7.4.0: "Remove" button in "Union of triangles" dialog is active if no objects are selected to remove --- diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx index 503de82d7..b2fdc8bdd 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx @@ -739,7 +739,7 @@ void SMESHGUI_MultiEditDlg::updateButtons() bool isListBoxNonEmpty = myListBox->count() > 0; bool isToAll = myToAllChk->isChecked(); myFilterBtn->setEnabled(!isToAll); - myRemoveBtn->setEnabled(isListBoxNonEmpty && !isToAll); + myRemoveBtn->setEnabled(myListBox->selectedItems().count() && !isToAll); mySortBtn->setEnabled(isListBoxNonEmpty &&!isToAll); const SALOME_ListIO& aList = mySelector->StoredIObjects(); @@ -859,6 +859,8 @@ void SMESHGUI_MultiEditDlg::onListSelectionChanged() mySelector->AddOrRemoveIndex(anActor->getIO(),anIndexes,false); if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) aViewWindow->highlight(anActor->getIO(),true,true); + + myRemoveBtn->setEnabled( anIndexes.Extent() ); } //=======================================================================