From: vsv Date: Wed, 7 Sep 2016 13:41:39 +0000 (+0300) Subject: Issue #1737: Use color of sketcher defined by user X-Git-Tag: V_2.5.0~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f4ff2e5467b8229e4b45bec013f0317189f11381;p=modules%2Fshaper.git Issue #1737: Use color of sketcher defined by user --- 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;