From c979ba741c97173589b9dc3860bd2c049072f392 Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 29 Jul 2013 12:21:40 +0000 Subject: [PATCH] 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 --- src/SMESHGUI/SMESHGUI.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index 120e2c803..ee7675db7 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -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 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) { -- 2.39.2