#4219 Contact Pressure plots : Simplify creation of plots, hide obsolete title

This commit is contained in:
Magne Sjaastad
2019-03-22 15:56:06 +01:00
parent 0dd5d40199
commit 31c54bab0b
7 changed files with 37 additions and 11 deletions

View File

@@ -102,22 +102,32 @@ void RicCreateSaturationPressurePlotsFeature::onActionTriggered(bool isChecked)
}
}
caf::PdmObject* objectToSelect = nullptr;
if (eclipseResultCase)
{
eclipseResultCase->ensureReservoirCaseIsOpen();
collection->createSaturationPressurePlots(eclipseResultCase);
std::vector<RimSaturationPressurePlot*> plots = collection->plots();
std::vector<RimSaturationPressurePlot*> plots = collection->createSaturationPressurePlots(eclipseResultCase);
for (auto plot : plots)
{
plot->loadDataAndUpdate();
plot->zoomAll();
plot->updateConnectedEditors();
}
if (!plots.empty())
{
objectToSelect = plots.front();
}
}
collection->updateAllRequiredEditors();
RiaApplication::instance()->getOrCreateAndShowMainPlotWindow();
if (objectToSelect)
{
RiuPlotMainWindowTools::selectAsCurrentItem(objectToSelect);
}
}
//--------------------------------------------------------------------------------------------------