]> SALOME platform Git repositories - modules/hydro.git/blobdiff - src/HYDROGUI/HYDROGUI_Overview.cxx
Salome HOME
refs #1328: debug of overview on show objects
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Overview.cxx
index 8b53cfeb87a713e091175a169c44ec2f3c14e11d..2077f91f27d1f52f504c4fba4b20f6b63791d65f 100644 (file)
@@ -276,7 +276,7 @@ void HYDROGUI_Overview::setMainView( OCCViewer_ViewFrame* theMainView )
 
   OCCViewer_ViewWindow* aMainView = myMainView->getView( OCCViewer_ViewFrame::MAIN_VIEW );
   connect( aMainView, SIGNAL( vpTransformationFinished( OCCViewer_ViewWindow::OperationType ) ),
-           this,      SLOT( OnTransformation() ) );
+           this,      SLOT( OnTransformationAfterOp( OCCViewer_ViewWindow::OperationType ) ) );
   connect( aMainView->getViewPort(), SIGNAL( vpResizeEvent( QResizeEvent* ) ),
            this,       SLOT( OnResizeEvent( QResizeEvent* ) ) );
   connect( aMainView->getViewPort(), SIGNAL( vpTransformed( OCCViewer_ViewPort* ) ),
@@ -329,6 +329,15 @@ void HYDROGUI_Overview::setTopView()
     myBand->update( true );
 }
 
+void HYDROGUI_Overview::OnTransformationAfterOp( OCCViewer_ViewWindow::OperationType theOp )
+{
+  if( theOp>=OCCViewer_ViewWindow::WINDOWFIT )
+  {
+    myViewPort->fitAll();
+  }
+  OnTransformation();
+}
+
 void HYDROGUI_Overview::OnTransformation()
 {
   if( myBand )