]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for issue 0020114: EDF VISU 918(Impossible to create a new clipping plane on...
authorrnv <rnv@opencascade.com>
Thu, 15 Jan 2009 12:34:02 +0000 (12:34 +0000)
committerrnv <rnv@opencascade.com>
Thu, 15 Jan 2009 12:34:02 +0000 (12:34 +0000)
src/VISUGUI/VisuGUI_ClippingDlg.cxx

index ce140e610e2a571d5f17ec304022af9633af1d9e..0312ffd7b7e4e9ce57883b254e19cc5ac9b5e8c4 100644 (file)
@@ -27,6 +27,7 @@
 
 #include "VISU_Prs3d_i.hh"
 #include "VISU_Result_i.hh"
+#include "VISU_ColoredPrs3dHolder_i.hh"
 
 #include "VISU_PipeLine.hxx"
 #include "VISU_DataSetActor.h"
@@ -648,7 +649,19 @@ void VisuGUI_ClippingDlg::onSelectionChanged()
     if (!anIO.IsNull()) 
       myIO = anIO;
 
-    SetPrs3d(dynamic_cast<VISU::Prs3d_i*>(aBase));
+    //----
+    // rnv: fix for issue 0020114 (EDF VISU 918 : Impossible to 
+    // create a new clipping plane on field presentation)
+    // set last visited presentation from holder as myPrs3d
+    VISU::ColoredPrs3dHolder_i* aHolder = dynamic_cast<VISU::ColoredPrs3dHolder_i*>(aBase);
+    VISU::Prs3d_i* aPrs3d = NULL;
+    if(aHolder) 
+      aPrs3d = aHolder->GetPrs3dDevice();
+    else
+      aPrs3d = dynamic_cast<VISU::Prs3d_i*>(aBase);
+    //----
+    
+    SetPrs3d(aPrs3d);
     if (myPrs3d) {
       std::for_each(myPlanes.begin(),myPlanes.end(),TSetVisiblity(false));
       myPlanes.clear();