From: asl Date: Wed, 11 Oct 2017 07:29:00 +0000 (+0300) Subject: refs #1328: debug of overview on show objects X-Git-Tag: v2.1~66^2~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7ce816fbca9d261a7c0b4b3b16fdb40abb395bb1;p=modules%2Fhydro.git refs #1328: debug of overview on show objects --- diff --git a/src/HYDROGUI/HYDROGUI_Overview.cxx b/src/HYDROGUI/HYDROGUI_Overview.cxx index 8b53cfeb..2077f91f 100644 --- a/src/HYDROGUI/HYDROGUI_Overview.cxx +++ b/src/HYDROGUI/HYDROGUI_Overview.cxx @@ -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 ) diff --git a/src/HYDROGUI/HYDROGUI_Overview.h b/src/HYDROGUI/HYDROGUI_Overview.h index f2a7ea6e..b96afdd8 100644 --- a/src/HYDROGUI/HYDROGUI_Overview.h +++ b/src/HYDROGUI/HYDROGUI_Overview.h @@ -21,6 +21,7 @@ #define HYDROGUI_OVERVIEW_H #include +#include 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* );