]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/XGUI/XGUI_Displayer.cpp
Salome HOME
Removed not used function SimpleAISobject
[modules/shaper.git] / src / XGUI / XGUI_Displayer.cpp
index a0fe6a50fcc1fb01432787b5f3037517c0d59f41..3a530c2f4aff8b6249612d07499c3fe9ec22a149 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <GeomAPI_Shape.h>
 #include <GeomAPI_IPresentable.h>
+#include <GeomAPI_ICustomPrs.h>
 
 #include <AIS_InteractiveContext.hxx>
 #include <AIS_LocalContext.hxx>
@@ -87,6 +88,12 @@ void XGUI_Displayer::display(ObjectPtr theObject, AISObjectPtr theAIS,
   Handle(AIS_InteractiveObject) anAISIO = theAIS->impl<Handle(AIS_InteractiveObject)>();
   if (!anAISIO.IsNull()) {
     myResult2AISObjectMap[theObject] = theAIS;
+    FeaturePtr aFeature = ModelAPI_Feature::feature(theObject);
+    if (aFeature.get() != NULL) {
+      GeomCustomPrsPtr aCustPrs = std::dynamic_pointer_cast<GeomAPI_ICustomPrs>(aFeature);
+      if (aCustPrs.get() != NULL)
+        aCustPrs->customisePresentation(theAIS);
+    }
     aContext->Display(anAISIO, false);
     aContext->SetDisplayMode(anAISIO, isShading? Shading : Wireframe, isUpdateViewer);
     if (aContext->HasOpenedContext()) {