From f94864f0a52c5d1e7e40fa29fc57dade13523fae Mon Sep 17 00:00:00 2001 From: dmv Date: Fri, 6 Mar 2009 12:40:52 +0000 Subject: [PATCH] IPAL20918 Color of Group of Nodes or Edges is not changed when Edit Group --- src/SMESHGUI/SMESHGUI_GroupDlg.cxx | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) 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);