From: dmv Date: Fri, 6 Mar 2009 12:40:08 +0000 (+0000) Subject: IPAL20918 Color of Group of Nodes or Edges is not changed when Edit Group X-Git-Tag: V5_1_1rc2~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f408ed4ef26fcc0101a747ad57c4ab15003c9d49;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 63b5d3956..5b3b5e22c 100644 --- a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx @@ -797,8 +797,14 @@ 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; + } + } QList aAddList; @@ -928,8 +934,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);