From: isn Date: Thu, 26 Oct 2017 09:15:13 +0000 (+0300) Subject: refs #1339 X-Git-Tag: v2.1~65^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=84a535df03fb037f21a056a1792c572d858d217c;p=modules%2Fhydro.git refs #1339 --- diff --git a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx index 134c3bd0..4fefda30 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx +++ b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx @@ -477,7 +477,7 @@ void HYDROGUI_CalculationOp::onMoveZones( SUIT_DataObject* theRegionItem, ::qobject_cast( inputPanel() ); if ( aPanel ) aPanel->refreshZonesBrowser(); - createPreview( false ); + createPreview( false, false, false ); } } } @@ -1197,7 +1197,7 @@ bool HYDROGUI_CalculationOp::createRegion( const QList& theZon return aRetValue; } -void HYDROGUI_CalculationOp::createPreview( const bool theLandCoverMap ) +void HYDROGUI_CalculationOp::createPreview( const bool theLandCoverMap, bool fitAllFlag, bool onTopViewAndFit ) { LightApp_Application* anApp = module()->getApp(); HYDROData_SequenceOfObjects aSeq; @@ -1285,9 +1285,13 @@ void HYDROGUI_CalculationOp::createPreview( const bool theLandCoverMap ) QApplication::processEvents( QEventLoop::ExcludeUserInputEvents ); } - module()->update( UF_OCCViewer | UF_FitAll ); + int UpdateFlags = UF_OCCViewer; + if (fitAllFlag) + UpdateFlags |= UF_FitAll; + module()->update( UpdateFlags ); - if ( OCCViewer_ViewWindow* vw = (OCCViewer_ViewWindow*)myPreviewViewManager->getActiveView() ) + OCCViewer_ViewWindow* vw = (OCCViewer_ViewWindow*)myPreviewViewManager->getActiveView(); + if ( onTopViewAndFit && vw ) vw->onTopView(); } } diff --git a/src/HYDROGUI/HYDROGUI_CalculationOp.h b/src/HYDROGUI/HYDROGUI_CalculationOp.h index 90925647..90cf82d1 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationOp.h +++ b/src/HYDROGUI/HYDROGUI_CalculationOp.h @@ -130,7 +130,7 @@ protected slots: void onRegenerateColors(); private: - void createPreview( const bool theLandCoverMap); + void createPreview( const bool theLandCoverMap, bool fitAllFlag = true, bool onTopViewAndFit = true); void closePreview( bool theRemoveViewManager = true ); void setObjectVisibility( Handle(HYDROData_Entity) theEntity, const bool theIsVisible ); void setZonesVisible( bool theIsVisible );