::qobject_cast<HYDROGUI_CalculationDlg*>( inputPanel() );
if ( aPanel )
aPanel->refreshZonesBrowser();
- createPreview( false );
+ createPreview( false, false, false );
}
}
}
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;
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();
}
}
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 );