Salome HOME
Fix for bug 9929: Signal 8 detected on RestoreViewParameters() in the second study
authorjfa <jfa@opencascade.com>
Thu, 27 Oct 2005 13:58:54 +0000 (13:58 +0000)
committerjfa <jfa@opencascade.com>
Thu, 27 Oct 2005 13:58:54 +0000 (13:58 +0000)
src/VISU_I/VISU_ViewManager_i.cc
src/VISU_I/VISU_View_i.cc

index 4c6c97e06d45de956e9b5243c267cdbea97ca233..cb396ceb7566975df6c23de30a5da6aab4d81ad3 100644 (file)
@@ -56,6 +56,8 @@
 #include <vtkRenderer.h>
 #include <vtkRenderWindow.h>
 
+#include <qapplication.h>
+
 using namespace std;
 
 #ifdef _DEBUG_
@@ -177,8 +179,10 @@ namespace VISU {
       //if (CheckStudy(myStudyDocument)) {
       if (myApplication) {
        TViewFrame* pView = new TViewFrame (myApplication);
-       if (pView->Create(1))
+       if (pView->Create(1)) {
          myResult = pView->_this();
+         qApp->processEvents(); // Fix for bug 9929
+       }
       }
     }
   };
index e655eac9f3f098b6faf3b4688e205f8305189fc6..20e75cf179df6fbd46409750d8aa8dafbb38e7fb 100644 (file)
@@ -1334,7 +1334,7 @@ namespace VISU {
                    const int mode,
                    const double xMin, const double xMax,
                    const double yMin, const double yMax):
-      myView(theView), 
+      myView(theView),
       myMode(mode),
       myXMin(xMin),myXMax(xMax),
       myYMin(yMin),myYMax(yMax)
@@ -1351,7 +1351,7 @@ namespace VISU {
     const double myYMax;
     Plot2d_ViewFrame* myView;
   };
-  
+
   void XYPlot_i::FitXRange(const CORBA::Double xMin,const CORBA::Double xMax)
   {
     const CORBA::Long mode = 1;
@@ -1374,7 +1374,7 @@ namespace VISU {
     const CORBA::Long mode = 0;
     ProcessVoidEvent(new TFitRangeEvent(myView,mode,xMin,xMax,yMin,yMax));
   }
-  
+
   void XYPlot_i::GetFitRanges(double& xMin, double& xMax, double& yMin, double& yMax)
   {
     double y2Min,y2Max;
@@ -1730,9 +1730,8 @@ namespace VISU {
     SetViewUp(theViewWindow,aViewUp);
     SetFocalPoint(theViewWindow,aFocalPnt);
     SetParallelScale(theViewWindow,aParallelScale);
-    ScaleView(theViewWindow,VISU::View3D::XAxis,aScaleFactor[0]);
-    ScaleView(theViewWindow,VISU::View3D::YAxis,aScaleFactor[1]);
-    ScaleView(theViewWindow,VISU::View3D::ZAxis,aScaleFactor[2]);
+    SVTK_ViewWindow* aViewWindow = VISU::GetViewWindow(theViewWindow);
+    aViewWindow->SetScale(aScaleFactor);
   }