From 7ce816fbca9d261a7c0b4b3b16fdb40abb395bb1 Mon Sep 17 00:00:00 2001 From: asl Date: Wed, 11 Oct 2017 10:29:00 +0300 Subject: [PATCH] refs #1328: debug of overview on show objects --- src/HYDROGUI/HYDROGUI_Overview.cxx | 11 ++++++++++- src/HYDROGUI/HYDROGUI_Overview.h | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) 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* ); -- 2.39.2