Salome HOME
The selections of elements corrected.
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_MoveNodesDlg.cxx
index fba4f187f6718e2bb6dc3948a18232e7b27192d8..f249535c87a3e4a6521ab88218941b9aa069233b 100644 (file)
@@ -153,8 +153,8 @@ QFrame* SMESHGUI_MoveNodesDlg::createMainFrame (QWidget* theParent)
 {
   QFrame* aFrame = new QFrame(theParent);
 
-  QPixmap iconMoveNode (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_DLG_MOVE_NODE")));
-  QPixmap iconSelect   (SMESHGUI::resourceMgr()->loadPixmap("SMESH", tr("ICON_SELECT")));
+  QPixmap iconMoveNode (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_DLG_MOVE_NODE")));
+  QPixmap iconSelect   (SMESH::GetResourceMgr( mySMESHGUI )->loadPixmap("SMESH", tr("ICON_SELECT")));
 
   QButtonGroup* aPixGrp = new QButtonGroup(1, Qt::Vertical, tr("MESH_NODE"), aFrame);
   aPixGrp->setExclusive(TRUE);
@@ -270,7 +270,7 @@ void SMESHGUI_MoveNodesDlg::reset()
 //=======================================================================
 bool SMESHGUI_MoveNodesDlg::onApply()
 {
-  if (SMESHGUI::GetSMESHGUI()->isActiveStudyLocked())
+  if (mySMESHGUI->isActiveStudyLocked())
     return false;
 
   if (!isValid(true))
@@ -323,7 +323,7 @@ void SMESHGUI_MoveNodesDlg::onClose()
 {
   mySelectionMgr->clearSelected();
   SMESH::SetPointRepresentation(false);
-  mySelector->SetSelectionMode(ActorSelection);
+  myViewWindow->SetSelectionMode(ActorSelection);
   disconnect(mySelectionMgr, 0, this, 0);
   disconnect(mySMESHGUI, 0, this, 0);
   mySMESHGUI->ResetState();
@@ -355,8 +355,10 @@ void SMESHGUI_MoveNodesDlg::onTextChange (const QString& theNewText)
       if(const SMDS_MeshElement *anElem = aMesh->FindElement(theNewText.toInt())) {
        TColStd_MapOfInteger aListInd;
        aListInd.Add(anElem->GetID());
-       mySelector->AddOrRemoveIndex(anIO,aListInd, true);
+       mySelector->AddOrRemoveIndex(anIO,aListInd, false);
        myViewWindow->highlight(anIO,true,true);
+       
+       onSelectionDone();
       }
     }
   }
@@ -417,7 +419,7 @@ void SMESHGUI_MoveNodesDlg::onDeactivate()
 void SMESHGUI_MoveNodesDlg::enterEvent (QEvent*)
 {
   if (!isEnabled()) {
-    SMESHGUI::GetSMESHGUI()->EmitSignalDeactivateDialog();
+    mySMESHGUI->EmitSignalDeactivateDialog();
 
     // set selection mode
     SMESH::SetPointRepresentation(true);