From: ouv Date: Mon, 3 Dec 2007 09:48:14 +0000 (+0000) Subject: Bug IPAL18040 - 4.x: color of the displayed edge group doesn't correspond to set... X-Git-Tag: V4_1_0rc2~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e9c972fa1ffd36e6b6befd8c6e7f01b0a57bcf86;p=modules%2Fsmesh.git Bug IPAL18040 - 4.x: color of the displayed edge group doesn't correspond to set one. --- diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index f4cd58ae6..ba766e20a 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -541,7 +541,14 @@ using namespace std; _PTR(SObject) aGroupSObject = SMESH::FindSObject(aGroupObject); if(SMESH_Actor *anActor = SMESH::FindActorByEntry(aGroupSObject->GetID().c_str())) - anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B ); + { + if( aGroupObject->GetType() == SMESH::NODE ) + anActor->SetNodeColor( aColor.R, aColor.G, aColor.B ); + else if( aGroupObject->GetType() == SMESH::EDGE ) + anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B ); + else + anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B ); + } } SMESH::RepaintCurrentView(); diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx index 15ada5033..d8144f320 100644 --- a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx @@ -587,7 +587,12 @@ namespace SMESH { aColor.B = (float)b / 255.0; aGroup->SetColor( aColor ); } - anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B ); + if( aGroup->GetType() == SMESH::NODE ) + anActor->SetNodeColor( aColor.R, aColor.G, aColor.B ); + else if( aGroup->GetType() == SMESH::EDGE ) + anActor->SetEdgeColor( aColor.R, aColor.G, aColor.B ); + else + anActor->SetSufaceColor( aColor.R, aColor.G, aColor.B ); } } }