mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2045 Summary : Update object editors when case is created or closed
This commit is contained in:
@@ -71,12 +71,6 @@ void RicImportSummaryCaseFeature::onActionTriggered(bool isChecked)
|
||||
RicImportSummaryCaseFeature::createAndAddSummaryCaseFromFile(f);
|
||||
}
|
||||
|
||||
RiuMainPlotWindow* mainPlotWindow = app->getOrCreateAndShowMainPlotWindow();
|
||||
if (mainPlotWindow && sumCaseColl->summaryCaseCount() > 0)
|
||||
{
|
||||
mainPlotWindow->selectAsCurrentItem(sumCaseColl->summaryCase(sumCaseColl->summaryCaseCount()-1));
|
||||
}
|
||||
|
||||
std::vector<RimCase*> cases;
|
||||
app->project()->allCases(cases);
|
||||
|
||||
@@ -105,8 +99,15 @@ bool RicImportSummaryCaseFeature::createAndAddSummaryCaseFromFile(const QString&
|
||||
RimSummaryCaseMainCollection* sumCaseColl = proj->activeOilField() ? proj->activeOilField()->summaryCaseMainCollection() : nullptr;
|
||||
if (!sumCaseColl) return false;
|
||||
|
||||
sumCaseColl->createAndAddSummaryCaseFromFileName(fileName);
|
||||
sumCaseColl->updateConnectedEditors();
|
||||
RimSummaryCase* sumCase = sumCaseColl->createAndAddSummaryCaseFromFileName(fileName);
|
||||
sumCaseColl->updateAllRequiredEditors();
|
||||
|
||||
RiuMainPlotWindow* mainPlotWindow = app->getOrCreateAndShowMainPlotWindow();
|
||||
if (mainPlotWindow)
|
||||
{
|
||||
mainPlotWindow->selectAsCurrentItem(sumCase);
|
||||
}
|
||||
|
||||
app->addToRecentFiles(fileName);
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user