Improve plot redraw scheduler

This commit is contained in:
Gaute Lindkvist 2019-11-25 10:46:17 +01:00
parent 293290827b
commit db869ccbd5
4 changed files with 8 additions and 1 deletions

View File

@ -27,6 +27,7 @@
#include "RiaFontCache.h" #include "RiaFontCache.h"
#include "RiaImportEclipseCaseTools.h" #include "RiaImportEclipseCaseTools.h"
#include "RiaLogging.h" #include "RiaLogging.h"
#include "RiaPlotWindowRedrawScheduler.h"
#include "RiaPreferences.h" #include "RiaPreferences.h"
#include "RiaProjectModifier.h" #include "RiaProjectModifier.h"
#include "RiaRegressionTestRunner.h" #include "RiaRegressionTestRunner.h"
@ -1449,6 +1450,7 @@ void RiaGuiApplication::onProjectBeingClosed()
RicHoloLensSessionManager::refreshToolbarState(); RicHoloLensSessionManager::refreshToolbarState();
RiaViewRedrawScheduler::instance()->clearViewsScheduledForUpdate(); RiaViewRedrawScheduler::instance()->clearViewsScheduledForUpdate();
RiaPlotWindowRedrawScheduler::instance()->clearAllScheduledUpdates();
RiaGuiApplication::clearAllSelections(); RiaGuiApplication::clearAllSelections();

View File

@ -111,7 +111,7 @@ void RiaPlotWindowRedrawScheduler::slotUpdateAndReplotScheduledItemsWhenReady()
{ {
if ( caf::ProgressState::isActive() ) if ( caf::ProgressState::isActive() )
{ {
startTimer( 10 ); startTimer( 100 );
return; return;
} }

View File

@ -44,6 +44,9 @@ private slots:
void slotUpdateAndReplotScheduledItemsWhenReady(); void slotUpdateAndReplotScheduledItemsWhenReady();
private: private:
RiaPlotWindowRedrawScheduler() = default;
~RiaPlotWindowRedrawScheduler() = default;
void startTimer( int msecs ); void startTimer( int msecs );
private: private:

View File

@ -20,6 +20,7 @@
#include "RiaGuiApplication.h" #include "RiaGuiApplication.h"
#include "RiaLogging.h" #include "RiaLogging.h"
#include "RiaPlotWindowRedrawScheduler.h"
#include "RiaViewRedrawScheduler.h" #include "RiaViewRedrawScheduler.h"
#include "Rim3dOverlayInfoConfig.h" #include "Rim3dOverlayInfoConfig.h"
@ -113,6 +114,7 @@ void RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( const QS
Riu3DMainWindowTools::setActiveViewer( viewer->layoutWidget() ); Riu3DMainWindowTools::setActiveViewer( viewer->layoutWidget() );
RiaViewRedrawScheduler::instance()->clearViewsScheduledForUpdate(); RiaViewRedrawScheduler::instance()->clearViewsScheduledForUpdate();
RiaPlotWindowRedrawScheduler::instance()->clearAllScheduledUpdates();
// riv->updateCurrentTimeStepAndRedraw(); // riv->updateCurrentTimeStepAndRedraw();
riv->createDisplayModelAndRedraw(); riv->createDisplayModelAndRedraw();