]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Implemetation of AutoColor
authorJérôme <jerome.lucas@cesgenslab.fr>
Wed, 4 Nov 2020 17:40:25 +0000 (18:40 +0100)
committerNicolas Rechatin <nicolas.rechatin@cea.fr>
Mon, 30 Aug 2021 12:56:38 +0000 (14:56 +0200)
src/XGUI/XGUI_Workshop.cpp

index 6208ca5eb731ea9217db4559867258cfdb966472..fb85f74322ac45c3c8bb31be91def208852aa571 100644 (file)
@@ -2558,29 +2558,8 @@ void XGUI_Workshop::changeAutoColor(const QObjectPtrList& theObjects)
     std::stringstream streamColor;
     streamColor<< aColor[0] <<","<< aColor[1] <<"," <<aColor[2];
 
-    /*Config_PropManager::registerProp("Visualization", "result_group_color", "Group color",
-                                                          Config_Prop::Color, streamColor.str());*/
-
     aProp->setValue(streamColor.str());
 
-    /* set the value to all results
-    foreach(ObjectPtr anObj, theObjects) {
-      ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(anObj);
-      if (aResult.get() != NULL) {
-        //aResult->setAutocolor(true); 
-        //ResultBodyPtr aBodyResult = std::dynamic_pointer_cast<ModelAPI_ResultBody>(aResult);
-        ResultBodyPtr aBodyResult = ModelAPI_Tools::bodyOwner(aResult,true);
-        if (aBodyResult.get() != NULL) { // change colors for all sub-solids
-          std::list<ResultPtr> allRes;
-          ModelAPI_Tools::allSubs(aBodyResult, allRes);
-          for(std::list<ResultPtr>::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();