0021941: [CEA 699] Use for Auto Color method on mesh group the same

algorithm that this one in GEOM which define colors (note 15888)

In AutoColor(), pass a generated color to a group
This commit is contained in:
eap 2013-07-29 12:21:40 +00:00
parent c17253baf7
commit c979ba741c

View File

@ -923,7 +923,8 @@
}
}
void AutoColor(){
void AutoColor()
{
SALOME_ListIO selected;
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
if( !app )
@ -946,6 +947,8 @@
if( aMainObject->_is_nil() )
return;
SUIT_OverrideCursor wc;
aMainObject->SetAutoColor( true ); // mesh groups are re-colored here
QList<SALOMEDS::Color> aReservedColors;
@ -962,6 +965,7 @@
SALOMEDS::Color aColor = SMESHGUI::getUniqueColor( aReservedColors );
aReservedColors.append( aColor );
#endif // SIMPLE_AUTOCOLOR
aGroupObject->SetColor( aColor );
_PTR(SObject) aGroupSObject = SMESH::FindSObject(aGroupObject);
if (aGroupSObject) {