X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_GroupDlg.cxx;h=b9396313bb87e81b284c3e58874978770855a78d;hp=9bf9e43f5f9758ef141072521b10a0dc6155ae0f;hb=5309d564cb25bce0159bf722cd6347c06f7bc13f;hpb=9d28d73b09e96b23cf9937afa17474f98508df18 diff --git a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx index 9bf9e43f5..b9396313b 100644 --- a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx @@ -89,6 +89,7 @@ SMESHGUI_GroupDlg::SMESHGUI_GroupDlg( SMESHGUI* theModule, const char* name, WStyle_Title | WStyle_SysMenu | WDestructiveClose), mySMESHGUI( theModule ), mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ), + mySelector(SMESH::GetViewWindow( theModule )->GetSelector()), myIsBusy( false ), myActor( 0 ) { @@ -103,7 +104,6 @@ SMESHGUI_GroupDlg::SMESHGUI_GroupDlg( SMESHGUI* theModule, const char* name, myGeomGroupLine->setEnabled(false); } - mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector(); /* Move widget on the botton right corner of main widget */ int x, y ; @@ -121,12 +121,11 @@ SMESHGUI_GroupDlg::SMESHGUI_GroupDlg( SMESHGUI* theModule, const char* name, WStyle_Title | WStyle_SysMenu | WDestructiveClose), mySMESHGUI( theModule ), mySelectionMgr( SMESH::GetSelectionMgr( theModule ) ), + mySelector(SMESH::GetViewWindow( theModule )->GetSelector()), myIsBusy( false ) { if (!name) setName("SMESHGUI_GroupDlg"); - mySelector = (SMESH::GetViewWindow( mySMESHGUI ))->GetSelector(); - initDialog(false); if (!theGroup->_is_nil()) init(theGroup); @@ -537,7 +536,7 @@ void SMESHGUI_GroupDlg::setSelectionMode (int theMode) return; if (mySelectionMode != theMode) { - mySelectionMgr->clearSelected(); + // [PAL10408] mySelectionMgr->clearSelected(); mySelectionMgr->clearFilters(); SMESH::SetPointRepresentation(false); if (theMode < 4) { @@ -563,14 +562,14 @@ void SMESHGUI_GroupDlg::setSelectionMode (int theMode) aViewWindow->SetSelectionMode(VolumeSelection); } } else { - if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) - aViewWindow->SetSelectionMode(ActorSelection); if (theMode == 4) mySelectionMgr->installFilter(mySubMeshFilter); else if (theMode == 5) mySelectionMgr->installFilter(myGroupFilter); else if (theMode == 6) mySelectionMgr->installFilter(myMeshFilter); + if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) + aViewWindow->SetSelectionMode(ActorSelection); } mySelectionMode = theMode; } @@ -716,8 +715,6 @@ void SMESHGUI_GroupDlg::onListSelectionChanged() SALOME_ListIO aList; aList.Append(myActor->getIO()); mySelectionMgr->setSelectedObjects(aList,false); - if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI )) - aViewWindow->highlight( myActor->getIO(), true, true ); } myIsBusy = false; } @@ -844,7 +841,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); @@ -1096,12 +1093,27 @@ void SMESHGUI_GroupDlg::onAdd() SMESH::ElementType aType = SMESH::ALL; switch(myTypeId) { - case 0: aType = SMESH::NODE; break; - case 1: aType = SMESH::EDGE; break; - case 2: aType = SMESH::FACE; break; - case 3: aType = SMESH::VOLUME; break; + case 0: + aType = SMESH::NODE; + mySelector->SetSelectionMode(NodeSelection); + break; + case 1: + aType = SMESH::EDGE; + mySelector->SetSelectionMode(EdgeSelection); + break; + case 2: + aType = SMESH::FACE; + mySelector->SetSelectionMode(FaceSelection); + break; + case 3: + aType = SMESH::VOLUME; + mySelector->SetSelectionMode(VolumeSelection); + break; + default: + mySelector->SetSelectionMode(ActorSelection); } + if (myCurrentLineEdit == 0) { //if (aNbSel != 1) { myIsBusy = false; return; } QString aListStr = ""; @@ -1209,7 +1221,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();