From 4d8e5578a342503470e4dded487cd9148dc3fdfd Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 12 Mar 2015 10:03:36 +0300 Subject: [PATCH] Change color for construction/body/group. Using one sketch entity color for points and lines in order to have the same color for circle. This presentation has both a point and a line. --- .../SketchPlugin_ConstraintPerpendicular.cpp | 2 +- src/SketchPlugin/SketchPlugin_ConstraintRigid.cpp | 2 +- src/SketchPlugin/SketchPlugin_Plugin.cpp | 14 ++++++-------- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/SketchPlugin/SketchPlugin_ConstraintPerpendicular.cpp b/src/SketchPlugin/SketchPlugin_ConstraintPerpendicular.cpp index 770eac2ef..ca791d55f 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintPerpendicular.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintPerpendicular.cpp @@ -79,7 +79,7 @@ AISObjectPtr SketchPlugin_ConstraintPerpendicular::getAISObject(AISObjectPtr the anAIS->createPerpendicular(aLine1, aLine2, aPlane); // Set color from preferences - std::vector aRGB = Config_PropManager::color("Visualization", "sketch_parallel_color", + std::vector aRGB = Config_PropManager::color("Visualization", "sketch_constraint_color", SKETCH_CONSTRAINT_COLOR); anAIS->setColor(aRGB[0], aRGB[1], aRGB[2]); return anAIS; diff --git a/src/SketchPlugin/SketchPlugin_ConstraintRigid.cpp b/src/SketchPlugin/SketchPlugin_ConstraintRigid.cpp index cd1aa6e73..51f4b3a01 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintRigid.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintRigid.cpp @@ -71,7 +71,7 @@ AISObjectPtr SketchPlugin_ConstraintRigid::getAISObject(AISObjectPtr thePrevious anAIS->createFixed(aShape, aPlane); // Set color from preferences - std::vector aRGB = Config_PropManager::color("Visualization", "sketch_parallel_color", + std::vector aRGB = Config_PropManager::color("Visualization", "sketch_constraint_color", SKETCH_CONSTRAINT_COLOR); anAIS->setColor(aRGB[0], aRGB[1], aRGB[2]); diff --git a/src/SketchPlugin/SketchPlugin_Plugin.cpp b/src/SketchPlugin/SketchPlugin_Plugin.cpp index 88f062b69..51efb1721 100644 --- a/src/SketchPlugin/SketchPlugin_Plugin.cpp +++ b/src/SketchPlugin/SketchPlugin_Plugin.cpp @@ -57,20 +57,18 @@ SketchPlugin_Plugin::SketchPlugin_Plugin() // register this plugin ModelAPI_Session::get()->registerPlugin(this); - Config_PropManager::registerProp("Visualization", "sketch_edge_color", "Sketch edge color", - Config_Prop::Color, SKETCH_EDGE_COLOR); + Config_PropManager::registerProp("Visualization", "sketch_entity_color", "Sketch enity color", + Config_Prop::Color, SKETCH_ENTITY_COLOR); - Config_PropManager::registerProp("Visualization", "sketch_point_color", "Sketch point color", - Config_Prop::Color, SKETCH_POINT_COLOR); - - Config_PropManager::registerProp("Visualization", "sketch_external_color", "Sketch external edge color", - Config_Prop::Color, SKETCH_EXTERNAL_EDGE_COLOR); + Config_PropManager::registerProp("Visualization", "sketch_external_color", "Sketch external entity color", + Config_Prop::Color, SKETCH_EXTERNAL_COLOR); Config_PropManager::registerProp("Visualization", "sketch_construction_color", "Sketch construction color", Config_Prop::Color, SKETCH_CONSTRUCTION_COLOR); - Config_PropManager::registerProp("Visualization", "sketch_parallel_color", "Sketch constraint color", + Config_PropManager::registerProp("Visualization", "sketch_constraint_color", "Sketch constraint color", Config_Prop::Color, SKETCH_CONSTRAINT_COLOR); + Config_PropManager::registerProp("Visualization", "sketch_dimension_color", "Sketch dimension color", Config_Prop::Color, SKETCH_DIMENSION_COLOR); -- 2.39.2