From f4ff2e5467b8229e4b45bec013f0317189f11381 Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 7 Sep 2016 16:41:39 +0300 Subject: [PATCH] Issue #1737: Use color of sketcher defined by user --- src/PartSet/PartSet_ResultSketchPrs.cpp | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/src/PartSet/PartSet_ResultSketchPrs.cpp b/src/PartSet/PartSet_ResultSketchPrs.cpp index dba8a45ac..3c0fbf920 100755 --- a/src/PartSet/PartSet_ResultSketchPrs.cpp +++ b/src/PartSet/PartSet_ResultSketchPrs.cpp @@ -208,28 +208,12 @@ void PartSet_ResultSketchPrs::appendShapeSelection(const Handle(SelectMgr_Select void PartSet_ResultSketchPrs::setAuxiliaryPresentationStyle(const bool isAuxiliary) { - std::vector aColor; - Standard_Real aWidth; - Standard_Integer aLineStyle; - - if (!isAuxiliary) { - aColor = Config_PropManager::color("Visualization", "result_construction_color", - ModelAPI_ResultConstruction::DEFAULT_COLOR()); - aWidth = PartSet_Tools::getAISDefaultWidth();// default width value - aLineStyle = SketchPlugin_SketchEntity::SKETCH_LINE_STYLE(); - } - else { - aColor = Config_PropManager::color("Visualization", "result_construction_color", - ModelAPI_ResultConstruction::DEFAULT_COLOR()); - aWidth = PartSet_Tools::getAISDefaultWidth();// default width value - aLineStyle = SketchPlugin_SketchEntity::SKETCH_LINE_STYLE_AUXILIARY(); - } + Standard_Integer aLineStyle = isAuxiliary? + SketchPlugin_SketchEntity::SKETCH_LINE_STYLE_AUXILIARY() : + SketchPlugin_SketchEntity::SKETCH_LINE_STYLE(); Handle(Prs3d_Drawer) aDrawer = Attributes(); - setColor(aDrawer, Quantity_Color(aColor[0] / 255., aColor[1] / 255., aColor[2] / 255., - Quantity_TOC_RGB)); - setWidth(aDrawer, aWidth); // set line style Handle(Prs3d_LineAspect) aLineAspect; -- 2.39.2