IPLA 52416: TC7.4.0: "Remove" button in "Union of triangles" dialog is active if no objects are selected to remove

This commit is contained in:
eap 2014-04-24 18:23:09 +04:00
parent ffd41e46b2
commit 70e4ab70fb

View File

@ -739,7 +739,7 @@ void SMESHGUI_MultiEditDlg::updateButtons()
bool isListBoxNonEmpty = myListBox->count() > 0; bool isListBoxNonEmpty = myListBox->count() > 0;
bool isToAll = myToAllChk->isChecked(); bool isToAll = myToAllChk->isChecked();
myFilterBtn->setEnabled(!isToAll); myFilterBtn->setEnabled(!isToAll);
myRemoveBtn->setEnabled(isListBoxNonEmpty && !isToAll); myRemoveBtn->setEnabled(myListBox->selectedItems().count() && !isToAll);
mySortBtn->setEnabled(isListBoxNonEmpty &&!isToAll); mySortBtn->setEnabled(isListBoxNonEmpty &&!isToAll);
const SALOME_ListIO& aList = mySelector->StoredIObjects(); const SALOME_ListIO& aList = mySelector->StoredIObjects();
@ -859,6 +859,8 @@ void SMESHGUI_MultiEditDlg::onListSelectionChanged()
mySelector->AddOrRemoveIndex(anActor->getIO(),anIndexes,false); mySelector->AddOrRemoveIndex(anActor->getIO(),anIndexes,false);
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->highlight(anActor->getIO(),true,true); aViewWindow->highlight(anActor->getIO(),true,true);
myRemoveBtn->setEnabled( anIndexes.Extent() );
} }
//======================================================================= //=======================================================================