]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
refs #1328: debug of overview on show objects
authorasl <asl@opencascade.com>
Wed, 11 Oct 2017 07:29:00 +0000 (10:29 +0300)
committerasl <asl@opencascade.com>
Wed, 11 Oct 2017 07:30:28 +0000 (10:30 +0300)
src/HYDROGUI/HYDROGUI_Overview.cxx
src/HYDROGUI/HYDROGUI_Overview.h

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 )
index f2a7ea6e5ac22b43a6b0fd49d1caf53545badedf..b96afdd81a4f50bf3866cb72665dd423d41e6117 100644 (file)
@@ -21,6 +21,7 @@
 #define HYDROGUI_OVERVIEW_H
 
 #include <QFrame>
+#include <OCCViewer_ViewWindow.h>
 
 class OCCViewer_ViewPort3d;
 class OCCViewer_ViewFrame;
@@ -47,6 +48,7 @@ protected:
   virtual bool eventFilter( QObject*, QEvent* );
 
 private slots:
+  void OnTransformationAfterOp( OCCViewer_ViewWindow::OperationType );
   void OnTransformation();
   void OnMouseEvent( QMouseEvent* );
   void OnResizeEvent( QResizeEvent* );