X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSketcherPrs%2FSketcherPrs_SymbolPrs.cpp;h=b8bdd9db71111e3cfbf3e5e3ca2bc6330fc25bbf;hb=53445a818411b3b71e3457f5e2e97c5f23d69cb7;hp=a2e51cbd4fb848d73e2f56d655f6c80571775692;hpb=dc75c390f0aa6108d6983a8618dc4b9a4cd5949e;p=modules%2Fshaper.git diff --git a/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp b/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp index a2e51cbd4..b8bdd9db7 100644 --- a/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp +++ b/src/SketcherPrs/SketcherPrs_SymbolPrs.cpp @@ -119,10 +119,9 @@ std::map SketcherPrs_SymbolPrs::myIconsM SketcherPrs_SymbolPrs::SketcherPrs_SymbolPrs(ModelAPI_Feature* theConstraint, - ModelAPI_CompositeFeature* theSketcher, - const std::shared_ptr& thePlane) + SketchPlugin_Sketch* theSketcher) : AIS_InteractiveObject(), myConstraint(theConstraint), - myPlane(thePlane), myIsCustomColor(false), + myPlane(theSketcher->coordinatePlane()), myIsCustomColor(false), mySketcher(theSketcher) { SetAutoHilight(Standard_False); @@ -342,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(); + } + } } //********************************************************************************* @@ -349,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 "<