From: nds Date: Fri, 20 Jan 2017 14:07:53 +0000 (+0300) Subject: Issue #1964 Splitting an auxiliary line gives a non auxiliary line X-Git-Tag: V_2.7.0~317 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0c493630542ba94bdb40104634b40325616ab3bb;p=modules%2Fshaper.git Issue #1964 Splitting an auxiliary line gives a non auxiliary line Style of sketch constraint split preview presentation should be the same as the base sketch entity has. --- diff --git a/src/SketchPlugin/SketchPlugin_ConstraintSplit.cpp b/src/SketchPlugin/SketchPlugin_ConstraintSplit.cpp index d2f64ddea..32199abce 100755 --- a/src/SketchPlugin/SketchPlugin_ConstraintSplit.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintSplit.cpp @@ -369,11 +369,27 @@ AISObjectPtr SketchPlugin_ConstraintSplit::getAISObject(AISObjectPtr thePrevious if (!anAIS) anAIS = AISObjectPtr(new GeomAPI_AISObject); anAIS->createShape(aShape); - anAIS->setWidth(5); + std::shared_ptr anAuxiliaryAttr = + aBaseFeature->data()->boolean(SketchPlugin_SketchEntity::AUXILIARY_ID()); + + bool isConstruction = anAuxiliaryAttr.get() != NULL && anAuxiliaryAttr->value(); + std::vector aColor; - aColor = Config_PropManager::color("Visualization", "sketch_entity_color", - SKETCH_ENTITY_COLOR); - anAIS->setColor(aColor[0], aColor[1], aColor[2]); + double aWidth = SketchPlugin_SketchEntity::SKETCH_LINE_WIDTH(); + int aLineStyle = SketchPlugin_SketchEntity::SKETCH_LINE_STYLE(); + if (isConstruction) { + aColor = Config_PropManager::color("Visualization", "sketch_auxiliary_color", + SKETCH_AUXILIARY_COLOR); + aWidth = SketchPlugin_SketchEntity::SKETCH_LINE_WIDTH_AUXILIARY(); + aLineStyle = SketchPlugin_SketchEntity::SKETCH_LINE_STYLE_AUXILIARY(); + } + else { + aColor = Config_PropManager::color("Visualization", "sketch_entity_color", + SKETCH_ENTITY_COLOR); + } + anAIS->setColor(aColor[0], aColor[1], aColor[2]); + anAIS->setWidth(aWidth + 1); + anAIS->setLineStyle(aLineStyle); } return anAIS; }