X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FVISU_I%2FVISU_View_i.cc;h=57a37098107b80b087638d1b0536d23cd2899dfe;hb=e208a04edd5d8cebc0185834ecdf3faec4514f99;hp=43224cd7a5f76e20ff75030ad128125699f7b9d0;hpb=776278fcaf14fcaa6265ddca8116a6a0209aa375;p=modules%2Fvisu.git diff --git a/src/VISU_I/VISU_View_i.cc b/src/VISU_I/VISU_View_i.cc index 43224cd7..57a37098 100644 --- a/src/VISU_I/VISU_View_i.cc +++ b/src/VISU_I/VISU_View_i.cc @@ -1557,7 +1557,7 @@ namespace VISU { {} virtual void Execute() { - SVTK_ViewWindow* vf = VISU::GetViewWindow(myVW); + SVTK_ViewWindow* vf = dynamic_cast(myVW); vtkRenderer* Renderer = vf->getRenderer(); vtkActorCollection* theActors = Renderer->GetActors(); theActors->InitTraversal(); @@ -1786,7 +1786,7 @@ namespace VISU { Storable::DataToStream(theStr,"myParallelScale",GetParallelScale(theViewWindow)); double aScaleFactor[3]; - VISU::GetViewWindow(theViewWindow)->GetScale(aScaleFactor); + (dynamic_cast(theViewWindow))->GetScale(aScaleFactor); Storable::DataToStream(theStr,"myScaleFactor[0]",aScaleFactor[0]); Storable::DataToStream(theStr,"myScaleFactor[1]",aScaleFactor[1]); Storable::DataToStream(theStr,"myScaleFactor[2]",aScaleFactor[2]); @@ -1841,7 +1841,7 @@ namespace VISU { aColor[1] = int(255.0*theColor.G); aColor[2] = int(255.0*theColor.B); QColor aNewColor (aColor[0],aColor[1],aColor[2]); - VISU::GetViewWindow(theViewWindow)->setBackgroundColor(aNewColor); + (dynamic_cast(theViewWindow))->setBackgroundColor(aNewColor); } SALOMEDS::Color View3D_i::GetBackground (SUIT_ViewWindow* theViewWindow) @@ -1922,7 +1922,7 @@ namespace VISU { SUIT_ViewWindow* aVW = GetViewWindow(); if (aVW) { ProcessVoidEvent(new TVoidMemFunEvent - (VISU::GetViewWindow(aVW), &SVTK_ViewWindow::onFitAll)); + (dynamic_cast(aVW), &SVTK_ViewWindow::onFitAll)); Update(); } } @@ -1936,27 +1936,27 @@ namespace VISU { switch (theType) { case VISU::View3D::FRONT : ProcessVoidEvent(new TVoidMemFunEvent - (VISU::GetViewWindow(aVW), &SVTK_ViewWindow::onFrontView)); + (dynamic_cast(aVW), &SVTK_ViewWindow::onFrontView)); break; case VISU::View3D::BACK : ProcessVoidEvent(new TVoidMemFunEvent - (VISU::GetViewWindow(aVW), &SVTK_ViewWindow::onBackView)); + (dynamic_cast(aVW), &SVTK_ViewWindow::onBackView)); break; case VISU::View3D::LEFT : ProcessVoidEvent(new TVoidMemFunEvent - (VISU::GetViewWindow(aVW),&SVTK_ViewWindow::onLeftView)); + (dynamic_cast(aVW),&SVTK_ViewWindow::onLeftView)); break; case VISU::View3D::RIGHT : ProcessVoidEvent(new TVoidMemFunEvent - (VISU::GetViewWindow(aVW),&SVTK_ViewWindow::onRightView)); + (dynamic_cast(aVW),&SVTK_ViewWindow::onRightView)); break; case VISU::View3D::TOP : ProcessVoidEvent(new TVoidMemFunEvent - (VISU::GetViewWindow(aVW),&SVTK_ViewWindow::onTopView)); + (dynamic_cast(aVW),&SVTK_ViewWindow::onTopView)); break; case VISU::View3D::BOTTOM : ProcessVoidEvent(new TVoidMemFunEvent - (VISU::GetViewWindow(aVW),&SVTK_ViewWindow::onBottomView)); + (dynamic_cast(aVW),&SVTK_ViewWindow::onBottomView)); break; } Update(); @@ -2126,7 +2126,7 @@ namespace VISU { void View3D_i::ScaleView (SUIT_ViewWindow* theViewWindow, VISU::View3D::Axis theAxis, CORBA::Double theParam) { - SVTK_ViewWindow* aViewWindow = VISU::GetViewWindow(theViewWindow); + SVTK_ViewWindow* aViewWindow = dynamic_cast(theViewWindow); double aScaleFactor[3]; aViewWindow->GetScale(aScaleFactor); aScaleFactor[theAxis] = theParam; @@ -2136,7 +2136,7 @@ namespace VISU { void SetScaleView (SUIT_ViewWindow* theViewWindow, const CORBA::Double theScale[3]) { double aScale[3] = {theScale[0], theScale[1], theScale[2]}; - VISU::GetViewWindow(theViewWindow)->SetScale(aScale); + (dynamic_cast(theViewWindow))->SetScale(aScale); } void View3D_i::ScaleView(VISU::View3D::Axis theAxis, CORBA::Double theParam) @@ -2145,7 +2145,7 @@ namespace VISU { SUIT_ViewWindow* aVW = GetViewWindow(); if (aVW) { double aScale[3]; - VISU::GetViewWindow(aVW)->GetScale(aScale); + (dynamic_cast(aVW))->GetScale(aScale); aScale[theAxis] = theParam; ProcessVoidEvent(new TSet3DViewParamEvent(&SetScaleView,aVW,aScale)); }