From: vsv Date: Thu, 4 Oct 2018 09:52:12 +0000 (+0300) Subject: Issue #2662: Highlight conflicting constraint by red color X-Git-Tag: CEA_2018-2~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=cd321a58fce57ebb24ad4fdda8696f2aeb56de17;p=modules%2Fshaper.git Issue #2662: Highlight conflicting constraint by red color --- diff --git a/src/SketchPlugin/SketchPlugin_Plugin.cpp b/src/SketchPlugin/SketchPlugin_Plugin.cpp index 4d5aa02e1..6a47d8539 100644 --- a/src/SketchPlugin/SketchPlugin_Plugin.cpp +++ b/src/SketchPlugin/SketchPlugin_Plugin.cpp @@ -77,7 +77,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 "0,0,0" +#define SKETCH_OVERCONSTRAINT_COLOR "255,0,0" #define SKETCH_FULLY_CONSTRAINED_COLOR "0,150,0" //#define SET_PLANES_COLOR_IN_PREFERENCES diff --git a/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp b/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp index f74c6b5db..b8bdd9db7 100644 --- a/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp +++ b/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp @@ -341,6 +341,18 @@ void SketcherPrs_SymbolPrs::SetCustomColor(const std::vector& theColor) if (!myAspect.IsNull()) myAspect->SetColor (myCustomColor); + + Handle(Prs3d_Presentation) aPrs = Presentation(); + if (!aPrs.IsNull()) { + if (myIsCustomColor) { + Handle(Graphic3d_PresentationAttributes) aAttr = new Graphic3d_PresentationAttributes(); + aAttr->SetColor(myCustomColor); + aPrs->Highlight(aAttr); + } + else { + aPrs->UnHighlight(); + } + } } //********************************************************************************* @@ -348,8 +360,6 @@ void SketcherPrs_SymbolPrs::drawShape(const std::shared_ptr& theS const Handle(Prs3d_Presentation)& thePrs, Quantity_Color theColor) const { - int aColNam = theColor.Name(); - //cout<<"### SketcherPrs_SymbolPrs::drawShape "<