X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_MultiEditDlg.cxx;h=018006f27c36a1f6046c0be6a9e5a8ebda637942;hp=503de82d7bb741cfb0f69c037a8d6be5d5cef31b;hb=929ce6ba39de08a6eb9441b73d70efaf36d30260;hpb=3e7b8f4975c2596515eb968a9e10932d2f2ee9fb diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx index 503de82d7..018006f27 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -53,7 +53,6 @@ #include #include #include -#include #include #include @@ -739,7 +738,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 +858,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() ); } //======================================================================= @@ -1078,7 +1079,7 @@ bool SMESHGUI_ChangeOrientationDlg::process (SMESH::SMESH_MeshEditor_ptr theEdit int SMESHGUI_ChangeOrientationDlg::nbElemsInMesh() { - return ( myFilterType = SMESH::FaceFilter ) ? myMesh->NbFaces() : myMesh->NbVolumes(); + return ( myFilterType == SMESH::FaceFilter ) ? myMesh->NbFaces() : myMesh->NbVolumes(); } /*! @@ -1282,7 +1283,7 @@ bool SMESHGUI_CuttingOfQuadsDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor, { if ( hasObj ) return theEditor->QuadTo4Tri( obj ), true; - SMESH::SMESH_IDSource_wrap elems = theEditor->MakeIDSource( theIds, SMESH::FACE ); + SMESH::IDSource_wrap elems = theEditor->MakeIDSource( theIds, SMESH::FACE ); theEditor->QuadTo4Tri( elems ); return true; } @@ -1618,7 +1619,7 @@ bool SMESHGUI_SplitVolumesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor, const SMESH::long_array& theIds, SMESH::SMESH_IDSource_ptr theObj) { - SMESH::SMESH_IDSource_wrap obj = theObj; + SMESH::IDSource_wrap obj = theObj; if ( CORBA::is_nil( obj )) obj = theEditor->MakeIDSource( theIds, SMESH::VOLUME ); else