mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 18:20:34 +05:00
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:
parent
c17253baf7
commit
c979ba741c
@ -923,7 +923,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoColor(){
|
void AutoColor()
|
||||||
|
{
|
||||||
SALOME_ListIO selected;
|
SALOME_ListIO selected;
|
||||||
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
|
||||||
if( !app )
|
if( !app )
|
||||||
@ -946,6 +947,8 @@
|
|||||||
if( aMainObject->_is_nil() )
|
if( aMainObject->_is_nil() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
SUIT_OverrideCursor wc;
|
||||||
|
|
||||||
aMainObject->SetAutoColor( true ); // mesh groups are re-colored here
|
aMainObject->SetAutoColor( true ); // mesh groups are re-colored here
|
||||||
|
|
||||||
QList<SALOMEDS::Color> aReservedColors;
|
QList<SALOMEDS::Color> aReservedColors;
|
||||||
@ -962,6 +965,7 @@
|
|||||||
SALOMEDS::Color aColor = SMESHGUI::getUniqueColor( aReservedColors );
|
SALOMEDS::Color aColor = SMESHGUI::getUniqueColor( aReservedColors );
|
||||||
aReservedColors.append( aColor );
|
aReservedColors.append( aColor );
|
||||||
#endif // SIMPLE_AUTOCOLOR
|
#endif // SIMPLE_AUTOCOLOR
|
||||||
|
aGroupObject->SetColor( aColor );
|
||||||
|
|
||||||
_PTR(SObject) aGroupSObject = SMESH::FindSObject(aGroupObject);
|
_PTR(SObject) aGroupSObject = SMESH::FindSObject(aGroupObject);
|
||||||
if (aGroupSObject) {
|
if (aGroupSObject) {
|
||||||
|
Loading…
Reference in New Issue
Block a user