From: jfa Date: Thu, 27 Oct 2005 13:58:54 +0000 (+0000) Subject: Fix for bug 9929: Signal 8 detected on RestoreViewParameters() in the second study X-Git-Tag: V3_1_0a3~21 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4f7a9d542961ae1241d7de9111b327689e460135;p=modules%2Fvisu.git Fix for bug 9929: Signal 8 detected on RestoreViewParameters() in the second study --- diff --git a/src/VISU_I/VISU_ViewManager_i.cc b/src/VISU_I/VISU_ViewManager_i.cc index 4c6c97e0..cb396ceb 100644 --- a/src/VISU_I/VISU_ViewManager_i.cc +++ b/src/VISU_I/VISU_ViewManager_i.cc @@ -56,6 +56,8 @@ #include #include +#include + 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 + } } } }; diff --git a/src/VISU_I/VISU_View_i.cc b/src/VISU_I/VISU_View_i.cc index e655eac9..20e75cf1 100644 --- a/src/VISU_I/VISU_View_i.cc +++ b/src/VISU_I/VISU_View_i.cc @@ -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); }