Salome HOME
Improve calculation of size of preferences panel.
[modules/shaper.git] / src / XGUI / XGUI_Displayer.cpp
index 3f7d23326ef5544ae0d448665bd08a89e2c2c3bf..7e690a0f1d1acf6a414c13d839b025026c5ce885 100644 (file)
@@ -77,6 +77,7 @@
 
 #include <TColStd_MapOfTransient.hxx>
 #include <TColStd_MapIteratorOfMapOfTransient.hxx>
+#include <Standard_Version.hxx>
 
 #ifdef TINSPECTOR
 #include <inspector/VInspectorAPI_CallBack.hxx>
@@ -314,6 +315,11 @@ bool XGUI_Displayer::redisplay(ObjectPtr theObject, bool theUpdateViewer)
       double aTransparency = ModelAPI_Tools::getTransparency(aResult);
       if ((aTransparency >= 0) && (aTransparency != aAISObj->getTransparency()))
         aAISObj->setTransparency(aTransparency);
+
+      // Set Iso-Lines
+      Handle(ModuleBase_ResultPrs) aResPrs = Handle(ModuleBase_ResultPrs)::DownCast(aAISIO);
+      if (!aResPrs.IsNull())
+        aResPrs->updateIsoLines();
     }
     myWorkshop->module()->storeSelection();
 
@@ -572,7 +578,8 @@ ObjectPtr XGUI_Displayer::getObject(const Handle(AIS_InteractiveObject)& theIO)
     if (!theIO.IsNull()) {
       anAISObj->setImpl(new Handle(AIS_InteractiveObject)(theIO));
     }
-    anObject = myWorkshop->module()->findPresentedObject(anAISObj);
+    if (myWorkshop->module())
+      anObject = myWorkshop->module()->findPresentedObject(anAISObj);
   }
   return anObject;
 }