mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1773 Update view and property editor when closing soursim data
This commit is contained in:
parent
37fdadeb69
commit
aa2123d05d
@ -45,6 +45,7 @@ void RicCloseSourSimDataFeature::onActionTriggered(bool isChecked)
|
||||
if (eclipseCase == nullptr) return;
|
||||
|
||||
eclipseCase->setSourSimFileName(QString());
|
||||
eclipseCase->updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -38,6 +38,8 @@
|
||||
#include "RimReservoirCellResultsStorage.h"
|
||||
#include "RimTimeStepFilter.h"
|
||||
#include "RimTools.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimEclipseCellColors.h"
|
||||
|
||||
#include "cafPdmSettings.h"
|
||||
#include "cafPdmUiFilePathEditor.h"
|
||||
@ -243,6 +245,25 @@ void RimEclipseResultCase::loadAndUpdateSourSimData()
|
||||
{
|
||||
rifReaderOutput->setHdf5FileName(m_sourSimFileName);
|
||||
}
|
||||
|
||||
if (!hasSourSimFile())
|
||||
{
|
||||
// Deselect SourSimRL cell results
|
||||
for (RimView* view : views())
|
||||
{
|
||||
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>(view);
|
||||
if (eclipseView != nullptr)
|
||||
{
|
||||
if (eclipseView->cellResult()->resultType() == RiaDefines::SOURSIMRL)
|
||||
{
|
||||
eclipseView->cellResult()->setResultType(RiaDefines::DYNAMIC_NATIVE);
|
||||
eclipseView->cellResult()->setResultVariable("SOIL");
|
||||
eclipseView->loadDataAndUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user