]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Regression correction: the axis is not displayed in the black dash-dots. The reason...
authornds <natalia.donis@opencascade.com>
Wed, 21 Jan 2015 09:33:50 +0000 (12:33 +0300)
committernds <natalia.donis@opencascade.com>
Wed, 21 Jan 2015 09:33:50 +0000 (12:33 +0300)
src/ConstructionPlugin/ConstructionPlugin_Axis.cpp
src/GeomAPI/GeomAPI_AISObject.cpp
src/GeomAPI/GeomAPI_AISObject.h

index 7315289b3c52227ee9495b438debb8b4041f2b5a..f0e45a5bf0bb9bc8cedc988e6cc0a6612ec6ca6b 100644 (file)
@@ -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
index 6be05290b1d06ac86d6ad5cc2c7f8c252ea6cc94..aea1179d62076fc4aaddd0a1c44f53950acf8787 100644 (file)
@@ -253,6 +253,14 @@ void GeomAPI_AISObject::createFixed(std::shared_ptr<GeomAPI_Shape> theShape,
   }
 }
 
+void GeomAPI_AISObject::redisplay()
+{
+  Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
+  if (!anAIS.IsNull()) {
+    Handle(AIS_InteractiveContext) aContext = anAIS->GetContext();
+    aContext->Redisplay(anAIS, false);
+  }
+}
 
 
 void GeomAPI_AISObject::setColor(const int& theColor)
index a76016bd6d738989f04238cb02037f5b291f17bb..c916320c093b70c4bfd9306df2fbee7c064ea3aa 100644 (file)
@@ -78,6 +78,10 @@ class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface
   void createFixed(std::shared_ptr<GeomAPI_Shape> theShape,
                    std::shared_ptr<GeomAPI_Pln> 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
    */