]> SALOME platform Git repositories - modules/hydro.git/commitdiff
Salome HOME
refs #1339 BR_1339
authorisn <isn@opencascade.com>
Thu, 26 Oct 2017 09:15:13 +0000 (12:15 +0300)
committerisn <isn@opencascade.com>
Thu, 26 Oct 2017 11:48:15 +0000 (14:48 +0300)
src/HYDROGUI/HYDROGUI_CalculationOp.cxx
src/HYDROGUI/HYDROGUI_CalculationOp.h

index 134c3bd0b2996beb4d13914db545b34c115e382b..4fefda300000b6d9f027f5fd72555739e51c7ff7 100644 (file)
@@ -477,7 +477,7 @@ void HYDROGUI_CalculationOp::onMoveZones( SUIT_DataObject* theRegionItem,
         ::qobject_cast<HYDROGUI_CalculationDlg*>( inputPanel() );
       if ( aPanel )
         aPanel->refreshZonesBrowser();
-      createPreview( false );
+      createPreview( false, false, false );
     }
   }
 }
@@ -1197,7 +1197,7 @@ bool HYDROGUI_CalculationOp::createRegion( const QList<SUIT_DataObject*>& 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();
   }
 }
index 909256474537af6d9825243262e5f4621c0921dc..90cf82d1ef01edf92c7d42c1c921667e6211d693 100644 (file)
@@ -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 );