From: nds Date: Wed, 21 Jan 2015 09:33:50 +0000 (+0300) Subject: Regression correction: the axis is not displayed in the black dash-dots. The reason... X-Git-Tag: V_1.0.0~22^2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5cbb6ac07fcf22b90ddab1a949c595e27ca30471;p=modules%2Fshaper.git Regression correction: the axis is not displayed in the black dash-dots. The reason is displayer correction to do not perform redisplay if the presentation is not modified. --- diff --git a/src/ConstructionPlugin/ConstructionPlugin_Axis.cpp b/src/ConstructionPlugin/ConstructionPlugin_Axis.cpp index 7315289b3..f0e45a5bf 100644 --- a/src/ConstructionPlugin/ConstructionPlugin_Axis.cpp +++ b/src/ConstructionPlugin/ConstructionPlugin_Axis.cpp @@ -52,4 +52,5 @@ void ConstructionPlugin_Axis::customisePresentation(AISObjectPtr thePrs) { thePrs->setColor(0, 0, 0); thePrs->setLineStyle(3); + thePrs->redisplay(); } \ No newline at end of file diff --git a/src/GeomAPI/GeomAPI_AISObject.cpp b/src/GeomAPI/GeomAPI_AISObject.cpp index 6be05290b..aea1179d6 100644 --- a/src/GeomAPI/GeomAPI_AISObject.cpp +++ b/src/GeomAPI/GeomAPI_AISObject.cpp @@ -253,6 +253,14 @@ void GeomAPI_AISObject::createFixed(std::shared_ptr theShape, } } +void GeomAPI_AISObject::redisplay() +{ + Handle(AIS_InteractiveObject) anAIS = impl(); + if (!anAIS.IsNull()) { + Handle(AIS_InteractiveContext) aContext = anAIS->GetContext(); + aContext->Redisplay(anAIS, false); + } +} void GeomAPI_AISObject::setColor(const int& theColor) diff --git a/src/GeomAPI/GeomAPI_AISObject.h b/src/GeomAPI/GeomAPI_AISObject.h index a76016bd6..c916320c0 100644 --- a/src/GeomAPI/GeomAPI_AISObject.h +++ b/src/GeomAPI/GeomAPI_AISObject.h @@ -78,6 +78,10 @@ class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface void createFixed(std::shared_ptr theShape, std::shared_ptr thePlane); + /** \brief Redisplays the current AIS object in the context + */ + void redisplay(); + /** \brief Assigns the color for the shape * \param[in] theColor index of the color */