Salome HOME
Fix for bug PAL10408 (Strange behaviour of the selection icon in the "create group...
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_GroupDlg.cxx
index 2a73bc99384abc66433bf321ce3514d48a7cee34..82da54af8c3566903314b83e75b0f201507acef0 100644 (file)
@@ -124,16 +124,20 @@ SMESHGUI_GroupDlg::SMESHGUI_GroupDlg( SMESHGUI* theModule, const char* name,
      myIsBusy( false )
 {
   if (!name) setName("SMESHGUI_GroupDlg");
+
+  mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
+
   initDialog(false);
   if (!theGroup->_is_nil())
     init(theGroup);
   else {
     mySelectSubMesh->setEnabled(false);
     mySelectGroup->setEnabled(false);
-  }
-
-  mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector();
 
+    myCurrentLineEdit = myMeshGroupLine;
+    setSelectionMode(5);
+  }
+  
   /* Move widget on the botton right corner of main widget */
   int x, y ;
   mySMESHGUI->DefineDlgPosition(this, x, y);
@@ -533,7 +537,7 @@ void SMESHGUI_GroupDlg::setSelectionMode (int theMode)
     return;
 
   if (mySelectionMode != theMode) {
-    mySelectionMgr->clearSelected();
+    // [PAL10408] mySelectionMgr->clearSelected();
     mySelectionMgr->clearFilters();
     SMESH::SetPointRepresentation(false);
     if (theMode < 4) {
@@ -840,7 +844,7 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged()
         aGroupMainShape = GEOM::GEOM_Object::_duplicate(myGeomGroup);
       _PTR(SObject) aGroupMainShapeSO =
         //aStudy->FindObjectIOR(aStudy->ConvertObjectToIOR(aGroupMainShape));
-        aStudy->FindObjectIOR(aGroupMainShape->GetStudyEntry());
+        aStudy->FindObjectID(aGroupMainShape->GetStudyEntry());
 
       // The mesh SObject
       _PTR(SObject) aMeshSO = SMESH::FindSObject(myMesh);
@@ -1205,7 +1209,7 @@ void SMESHGUI_GroupDlg::onAdd()
     if (aGroupType == aType) {
       _PTR(SObject) aGroupSO =
         //aStudy->FindObjectIOR(aStudy->ConvertObjectToIOR(myGeomGroup));
-        aStudy->FindObjectIOR(myGeomGroup->GetStudyEntry());
+        aStudy->FindObjectID(myGeomGroup->GetStudyEntry());
       // Construct filter
       SMESH::FilterManager_var aFilterMgr = SMESH::GetFilterManager();
       SMESH::Filter_var aFilter = aFilterMgr->CreateFilter();