mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2369 Elm Props: Remove deleted field results from cache
This commit is contained in:
@@ -137,10 +137,24 @@ void RigFemPartResultsCollection::addElementPropertyFiles(const std::vector<QStr
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigFemPartResultsCollection::removeElementPropertyFiles(const std::vector<QString>& filenames)
|
||||
{
|
||||
std::vector<RigFemResultAddress> addressesToRemove;
|
||||
|
||||
for (const QString filename : filenames)
|
||||
{
|
||||
std::vector<std::string> fields = m_elementPropertyReader->fieldsInFile(filename.toStdString());
|
||||
|
||||
for (std::string field : fields)
|
||||
{
|
||||
addressesToRemove.push_back(RigFemResultAddress(RIG_ELEMENT, field, ""));
|
||||
}
|
||||
|
||||
m_elementPropertyReader->removeFile(filename.toStdString());
|
||||
}
|
||||
|
||||
for (const RigFemResultAddress& address : addressesToRemove)
|
||||
{
|
||||
this->deleteResult(address);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user