From: nds Date: Tue, 9 Feb 2016 07:22:45 +0000 (+0300) Subject: 2.17. Improved management of overconstraint situation: overconstraint color is in... X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6f69e8c7bc2e7ad8e2d36ccde9cd5fdd6000b8df;p=modules%2Fshaper.git 2.17. Improved management of overconstraint situation: overconstraint color is in preferences --- diff --git a/src/PartSet/PartSet_OverconstraintListener.cpp b/src/PartSet/PartSet_OverconstraintListener.cpp index e03a667f9..a9c5dc2ad 100755 --- a/src/PartSet/PartSet_OverconstraintListener.cpp +++ b/src/PartSet/PartSet_OverconstraintListener.cpp @@ -11,6 +11,7 @@ #include "XGUI_Displayer.h" #include "SketcherPrs_SymbolPrs.h" +#include "SketchPlugin_SketchEntity.h" #include "Events_Loop.h" @@ -37,7 +38,8 @@ bool PartSet_OverconstraintListener::isConflictingObject(const ObjectPtr& theObj void PartSet_OverconstraintListener::getConflictingColor(std::vector& theColor) { - Quantity_Color aColor = Quantity_Color(Quantity_NameOfColor::Quantity_NOC_RED); + Quantity_Color aColor = ModuleBase_Tools::color("Visualization", "sketch_overconstraint_color", + SKETCH_OVERCONSTRAINT_COLOR); theColor.push_back(aColor.Red()*255.); theColor.push_back(aColor.Green()*255.); diff --git a/src/SketchPlugin/SketchPlugin_Plugin.cpp b/src/SketchPlugin/SketchPlugin_Plugin.cpp index 03a5d894c..0d3c66fd5 100644 --- a/src/SketchPlugin/SketchPlugin_Plugin.cpp +++ b/src/SketchPlugin/SketchPlugin_Plugin.cpp @@ -94,6 +94,10 @@ SketchPlugin_Plugin::SketchPlugin_Plugin() Config_PropManager::registerProp("Visualization", "sketch_dimension_color", "Sketch dimension color", Config_Prop::Color, SKETCH_DIMENSION_COLOR); + Config_PropManager::registerProp("Visualization", "sketch_overconstraint_color", + "Sketch overconstraint color", + Config_Prop::Color, SKETCH_OVERCONSTRAINT_COLOR); + // register sketcher properties #ifdef SET_PLANES_COLOR_IN_PREFERENCES Config_PropManager::registerProp("Visualization", "yz_plane_color", "YZ plane color", diff --git a/src/SketchPlugin/SketchPlugin_SketchEntity.h b/src/SketchPlugin/SketchPlugin_SketchEntity.h index 16101d186..58ac7eb9a 100644 --- a/src/SketchPlugin/SketchPlugin_SketchEntity.h +++ b/src/SketchPlugin/SketchPlugin_SketchEntity.h @@ -23,6 +23,7 @@ #define SKETCH_ENTITY_COLOR "225,0,0" #define SKETCH_EXTERNAL_COLOR "170,0,225" #define SKETCH_AUXILIARY_COLOR "0,85,0" +#define SKETCH_OVERCONSTRAINT_COLOR "255,0,0" /**\class SketchPlugin_SketchEntity * \ingroup Plugins