Salome HOME
0052610: Inactive "eye" icon after mesh compound creation
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MergeDlg.cxx
index f5b7754c2cd8eea6646319e83c28e600709e102b..046bd063c7f71b280a438b4cfed5e9801ae9771e 100644 (file)
@@ -682,6 +682,8 @@ bool SMESHGUI_MergeDlg::ClickOnApply()
   
   ListCoincident->clear();
   
+  myEditCurrentArgument = (QWidget*)LineEditMesh;
+
   SMESH::UpdateView();
   SMESHGUI::Modified();
   
@@ -833,6 +835,7 @@ void SMESHGUI_MergeDlg::onDetect()
 
   ListCoincident->selectAll();
   updateControls();
+  SMESH::UpdateView();
 }
 
 //=================================================================================
@@ -843,6 +846,10 @@ void SMESHGUI_MergeDlg::onSelectGroup()
 {
   if (myIsBusy || !myActor)
     return;
+
+  if( ListCoincident->count() != ListCoincident->selectedItems().count() )
+    SelectAllCB->setChecked( false );
+
   myEditCurrentArgument = (QWidget*)ListCoincident;
 
   myIsBusy = true;
@@ -992,6 +999,11 @@ void SMESHGUI_MergeDlg::onRemoveGroup()
   updateControls();
   SMESH::UpdateView();
   myIsBusy = false;
+
+  if( ListCoincident->count() == 0 ) {
+    myEditCurrentArgument = (QWidget*)LineEditMesh;
+    SelectAllCB->setChecked( false );
+  }
 }
 
 //=================================================================================
@@ -1048,6 +1060,11 @@ void SMESHGUI_MergeDlg::onRemoveElement()
   
   myIsBusy = false;
   onEditGroup();
+
+  if( ListCoincident->count() == 0 ) {
+    myEditCurrentArgument = (QWidget*)LineEditMesh;
+    SelectAllCB->setChecked( false );
+  }
 }
 
 //=================================================================================
@@ -1139,7 +1156,7 @@ void SMESHGUI_MergeDlg::SelectionIntoArgument()
     if (!myActor)
       myActor = SMESH::FindActorByObject(myMesh);
     
-    if ( myActor && myTypeId ==1 ) {
+    if ( myActor && myTypeId == 1 && mySelector->IsSelectionEnabled() ) {
       mySubMeshOrGroup = SMESH::SMESH_IDSource::_nil();
       mySelectionMgr->installFilter(myMeshOrSubMeshOrGroupFilter);
       
@@ -1292,12 +1309,14 @@ void SMESHGUI_MergeDlg::onTypeChanged (int id)
       GroupCoincidentWidget->show();
       SMESH::SetPointRepresentation(true);
       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-        aViewWindow->SetSelectionMode(NodeSelection);
+        if( mySelector->IsSelectionEnabled() )
+          aViewWindow->SetSelectionMode(NodeSelection);
     }
     else {
       GroupCoincident->show();
       if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
-        aViewWindow->SetSelectionMode(CellSelection);
+        if( mySelector->IsSelectionEnabled() )
+          aViewWindow->SetSelectionMode(CellSelection);
     }
     GroupEdit->show();
     break;