mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4219 Contact Pressure plots : Simplify creation of plots, hide obsolete title
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user