From: dmv Date: Fri, 6 Mar 2009 12:40:52 +0000 (+0000) Subject: IPAL20918 Color of Group of Nodes or Edges is not changed when Edit Group X-Git-Tag: V4_1_5rc1~24 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f94864f0a52c5d1e7e40fa29fc57dade13523fae;p=modules%2Fsmesh.git IPAL20918 Color of Group of Nodes or Edges is not changed when Edit Group --- diff --git a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx index 14dcc9d39..59052bc9a 100644 --- a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx @@ -816,8 +816,15 @@ bool SMESHGUI_GroupDlg::onApply() myGroup->SetColor(aColor); _PTR(SObject) aMeshGroupSO = SMESH::FindSObject(myGroup); - if (SMESH_Actor *anActor = SMESH::FindActorByEntry(aMeshGroupSO->GetID().c_str())) - anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B ); + + if (SMESH_Actor *anActor = SMESH::FindActorByEntry(aMeshGroupSO->GetID().c_str())) { + switch ( myTypeId ) { + case 0: anActor->SetNodeColor( aColor.R, aColor.G, aColor.B ); break; + case 1: anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B ); break; + case 2: + case 3: anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B ); break; + } + } QValueList aAddList; QValueList::iterator anIt; @@ -941,8 +948,14 @@ bool SMESHGUI_GroupDlg::onApply() myGroupOnGeom->SetColor(aColor); _PTR(SObject) aMeshGroupSO = SMESH::FindSObject(myGroupOnGeom); - if (SMESH_Actor *anActor = SMESH::FindActorByEntry(aMeshGroupSO->GetID().c_str())) - anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B ); + if (SMESH_Actor *anActor = SMESH::FindActorByEntry(aMeshGroupSO->GetID().c_str())) { + switch ( myTypeId ) { + case 0: anActor->SetNodeColor( aColor.R, aColor.G, aColor.B ); break; + case 1: anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B ); break; + case 2: + case 3: anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B ); break; + } + } } mySMESHGUI->updateObjBrowser(true);