From: rnv Date: Thu, 15 Jan 2009 12:32:29 +0000 (+0000) Subject: Fix for issue 0020114: EDF VISU 918(Impossible to create a new clipping plane on... X-Git-Tag: V4_1_0_maintainance_20090206~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=387615e092d35c4a55e72879e65bf09b8ab130db;p=modules%2Fvisu.git Fix for issue 0020114: EDF VISU 918(Impossible to create a new clipping plane on field presentation). --- diff --git a/src/VISUGUI/VisuGUI_ClippingDlg.cxx b/src/VISUGUI/VisuGUI_ClippingDlg.cxx index 68168fe1..fa46406c 100644 --- a/src/VISUGUI/VisuGUI_ClippingDlg.cxx +++ b/src/VISUGUI/VisuGUI_ClippingDlg.cxx @@ -27,6 +27,7 @@ #include "VISU_Prs3d_i.hh" #include "VISU_Result_i.hh" +#include "VISU_ColoredPrs3dHolder_i.hh" #include "VISU_PipeLine.hxx" @@ -614,7 +615,19 @@ void VisuGUI_ClippingDlg::onSelectionChanged() if (!anIO.IsNull()) myIO = anIO; - SetPrs3d(dynamic_cast(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(aBase); + VISU::Prs3d_i* aPrs3d = NULL; + if(aHolder) + aPrs3d = aHolder->GetPrs3dDevice(); + else + aPrs3d = dynamic_cast(aBase); + //---- + + SetPrs3d(aPrs3d); if (myPrs3d) { std::for_each(myPlanes.begin(),myPlanes.end(),TSetVisiblity(false)); myPlanes.clear();