From: Jérôme Date: Wed, 4 Nov 2020 17:40:25 +0000 (+0100) Subject: Implemetation of AutoColor X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=406d0cec419986fe7beaca4dfee15092a684efd1;p=modules%2Fshaper.git Implemetation of AutoColor --- diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 6208ca5eb..fb85f7432 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -2558,29 +2558,8 @@ void XGUI_Workshop::changeAutoColor(const QObjectPtrList& theObjects) std::stringstream streamColor; streamColor<< aColor[0] <<","<< aColor[1] <<"," <setValue(streamColor.str()); - /* set the value to all results - foreach(ObjectPtr anObj, theObjects) { - ResultPtr aResult = std::dynamic_pointer_cast(anObj); - if (aResult.get() != NULL) { - //aResult->setAutocolor(true); - //ResultBodyPtr aBodyResult = std::dynamic_pointer_cast(aResult); - ResultBodyPtr aBodyResult = ModelAPI_Tools::bodyOwner(aResult,true); - if (aBodyResult.get() != NULL) { // change colors for all sub-solids - std::list allRes; - ModelAPI_Tools::allSubs(aBodyResult, allRes); - for(std::list::iterator aRes = allRes.begin(); aRes != allRes.end(); aRes++) { - //(*aRes)->setAutocolor(true); - ModelAPI_Tools::setColor(*aRes, aColor); - } - } - ModelAPI_Tools::setColor(aResult, aColor); - } - }*/ Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_TO_REDISPLAY)); aMgr->finishOperation(); updateCommandStatus();