IPAL20918 Color of Group of Nodes or Edges is not changed when Edit Group

This commit is contained in:
dmv 2009-03-06 12:40:08 +00:00
parent fd5333a3ed
commit f408ed4ef2

View File

@ -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<int> 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);