#3862 Reload case. Reset time step filter during reload to fix issue

This commit is contained in:
Bjørn Erik Jensen 2018-12-19 08:26:12 +01:00
parent 0e910e7391
commit d202e430d2
3 changed files with 19 additions and 0 deletions

View File

@ -242,6 +242,7 @@ void RimEclipseResultCase::reloadEclipseGridFile()
{
m_gridAndWellDataIsReadFromFile = false;
m_activeCellInfoIsReadFromFile = false;
m_timeStepFilter->reset();
setReservoirData(nullptr);
openReserviorCase();
}

View File

@ -181,6 +181,21 @@ bool RimTimeStepFilter::updateFilteredTimeStepsFromUi()
return true;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimTimeStepFilter::reset()
{
m_filterType = TS_ALL;
m_filteredTimeSteps.v().clear();
m_filteredTimeStepsUi.v().clear();
m_firstTimeStep = 0;
m_lastTimeStep = 0;
m_interval = 1;
m_dateFormat = QString("yyyy-MM-dd");
m_timeStepNamesFromFile.v().clear();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -52,6 +52,9 @@ public:
void setTimeStepsFromFile(const std::vector<std::pair<QString, QDateTime>>& timeSteps);
std::vector<size_t> filteredTimeSteps() const;
bool updateFilteredTimeStepsFromUi();
void reset();
private:
std::vector<std::pair<QString, QDateTime>> allTimeSteps() const;
std::vector<int> filteredTimeStepIndicesFromUi() const;