#1623 Schedule invalidation of completion type results instead of immediate calculation

This commit is contained in:
Bjørnar Grip Fjær
2017-06-20 16:15:47 +02:00
parent 5a02cf1498
commit 78c948ea89
6 changed files with 37 additions and 18 deletions

View File

@@ -213,11 +213,12 @@ RiaApplication::RiaApplication(int& argc, char** argv)
// instead of using the application font
m_standardFont = new caf::FixedAtlasFont(caf::FixedAtlasFont::POINT_SIZE_8);
m_resViewUpdateTimer = NULL;
m_resViewUpdateTimer = nullptr;
m_recalculateCompletionTypeTimer = nullptr;
m_runningRegressionTests = false;
m_mainPlotWindow = NULL;
m_mainPlotWindow = nullptr;
m_recentFileActionProvider = std::unique_ptr<RiuRecentFileActionProvider>(new RiuRecentFileActionProvider);
}
@@ -2744,6 +2745,21 @@ void RiaApplication::scheduleDisplayModelUpdateAndRedraw(RimView* resViewToUpdat
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaApplication::scheduleRecalculateCompletionTypeAndRedraw()
{
if (!m_recalculateCompletionTypeTimer)
{
m_recalculateCompletionTypeTimer = new QTimer(this);
m_recalculateCompletionTypeTimer->setSingleShot(true);
connect(m_recalculateCompletionTypeTimer, SIGNAL(timeout()), this, SLOT(slotRecaulculateCompletionType()));
}
m_recalculateCompletionTypeTimer->start(500);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -2784,6 +2800,17 @@ void RiaApplication::slotUpdateScheduledDisplayModels()
m_resViewsToUpdate.clear();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiaApplication::slotRecaulculateCompletionType()
{
for (RimEclipseCase* eclipseCase : project()->activeOilField()->analysisModels->cases())
{
eclipseCase->recalculateCompletionTypeAndRedrawAllViews();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------