#3549 Temporary LGR : Delete cached extractors and redraw curves

This commit is contained in:
Magne Sjaastad 2018-10-24 12:59:43 +02:00
parent 6445ab05fe
commit 166d7dcb6c
10 changed files with 61 additions and 3 deletions

View File

@ -43,6 +43,8 @@
#include "RimProject.h"
#include "RimWellPathCollection.h"
#include "RimWellPathCompletions.h"
#include "RimMainPlotCollection.h"
#include "RimWellLogPlotCollection.h"
#include "RiuPlotMainWindow.h"
@ -141,7 +143,9 @@ void RicCreateTemporaryLgrFeature::onActionTriggered(bool isChecked)
}
deleteAllCachedData(eclipseCase);
RiaApplication::instance()->project()->mainPlotCollection()->deleteAllCachedData();
computeCachedData(eclipseCase);
RiaApplication::instance()->project()->mainPlotCollection()->wellLogPlotCollection()->reloadAllPlots();
activeView->loadDataAndUpdate();

View File

@ -224,3 +224,13 @@ void RimMainPlotCollection::updatePlotsWithCompletions()
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimMainPlotCollection::deleteAllCachedData()
{
m_wellLogPlotCollection()->deleteAllExtractors();
m_rftPlotCollection()->deleteAllExtractors();
m_pltPlotCollection()->deleteAllExtractors();
}

View File

@ -60,6 +60,7 @@ public:
void updateCurrentTimeStepInPlots();
void updatePlotsWithFormations();
void updatePlotsWithCompletions();
void deleteAllCachedData();
private:
// Overridden PDM methods

View File

@ -185,6 +185,15 @@ void RimPltPlotCollection::removeExtractors(const RigGeoMechCaseData* caseData)
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimPltPlotCollection::deleteAllExtractors()
{
m_extractors.clear();
m_geomExtractors.clear();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -58,6 +58,7 @@ public:
void removeExtractors(const RigWellPath* wellPath);
void removeExtractors(const RigEclipseCaseData* caseData);
void removeExtractors(const RigGeoMechCaseData* caseData);
void deleteAllExtractors();
const std::vector<RimWellPltPlot*> pltPlots() const;
void addPlot(RimWellPltPlot* newPlot);

View File

@ -185,6 +185,15 @@ void RimRftPlotCollection::removeExtractors(const RigGeoMechCaseData* caseData)
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimRftPlotCollection::deleteAllExtractors()
{
m_extractors.clear();
m_geomExtractors.clear();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -58,6 +58,7 @@ public:
void removeExtractors(const RigWellPath* wellPath);
void removeExtractors(const RigEclipseCaseData* caseData);
void removeExtractors(const RigGeoMechCaseData* caseData);
void deleteAllExtractors();
const std::vector<RimWellRftPlot*> rftPlots() const;
void addPlot(RimWellRftPlot* newPlot);

View File

@ -134,6 +134,26 @@ RigGeoMechWellLogExtractor* RimWellLogPlotCollection::findOrCreateExtractor(RimW
return extractor.p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogPlotCollection::reloadAllPlots()
{
for (const auto& w : wellLogPlots())
{
w->loadDataAndUpdate();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimWellLogPlotCollection::deleteAllExtractors()
{
m_extractors.clear();
m_geomExtractors.clear();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@ -54,6 +54,9 @@ public:
RigEclipseWellLogExtractor* findOrCreateExtractor(RimWellPath* wellPath, RimEclipseCase* eclCase);
RigGeoMechWellLogExtractor* findOrCreateExtractor(RimWellPath* wellPath, RimGeoMechCase* eclCase);
void reloadAllPlots();
void deleteAllExtractors();
void removeExtractors(const RigWellPath* wellPath);
void removeExtractors(const RigEclipseCaseData* caseData);
void removeExtractors(const RigGeoMechCaseData* caseData);

View File

@ -440,7 +440,7 @@ QStringList RigCaseCellResultsData::resultNames(RiaDefines::ResultCatType resTyp
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
RigActiveCellInfo* RigCaseCellResultsData::activeCellInfo()
{
@ -448,7 +448,7 @@ RigActiveCellInfo* RigCaseCellResultsData::activeCellInfo()
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
const RigActiveCellInfo* RigCaseCellResultsData::activeCellInfo() const
{
@ -783,7 +783,7 @@ const std::vector<double>*
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
const std::vector<RigEclipseResultInfo>& RigCaseCellResultsData::infoForEachResultIndex()
{