]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
2.17. Improved management of overconstraint situation: overconstraint color is in...
authornds <nds@opencascade.com>
Tue, 9 Feb 2016 07:22:45 +0000 (10:22 +0300)
committernds <nds@opencascade.com>
Tue, 9 Feb 2016 07:22:45 +0000 (10:22 +0300)
src/PartSet/PartSet_OverconstraintListener.cpp
src/SketchPlugin/SketchPlugin_Plugin.cpp
src/SketchPlugin/SketchPlugin_SketchEntity.h

index e03a667f9aac2ee4eb9194b68bf7de3747d14939..a9c5dc2adc16b8fd0340c5eeeff1ec164db9cb34 100755 (executable)
@@ -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<int>& 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.);
index 03a5d894c981c7855f370eb37d37df3be44e5b86..0d3c66fd57f4b0823b226e1d964a0d81f107eabc 100644 (file)
@@ -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",
index 16101d1866aaac9b4c70b587adf8e23782152e7e..58ac7eb9a55b4cd7f0e4a7c98e118fde70ebdd45 100644 (file)
@@ -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