mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-27 23:50:19 -05:00
#14539 Summary Plot: Preserve user defined axis ranges when the data source changes
An axis range defined by the user is now kept when a summary case or ensemble is added, reloaded or replaced. The range is marked as user defined when the user edits the min/max values, unchecks "Set Range Automatically" or zooms interactively in the plot. The user defined range is released by "Zoom All", by double click in a plot, by checking "Set Range Automatically" or by changing the Y axis range aggregation of a summary multi plot.
This commit is contained in:
1 parent
f38332b2e6
commit
110bdbe0c7
11 files changed
+121
-7
No files matched your search
@@ -470,6 +470,15 @@ void RimSummaryMultiPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedFi
|
||||
}
|
||||
else if ( changedField == &m_axisRangeAggregation )
|
||||
{
|
||||
// The user has asked for a new computation of the Y axis range, release any user defined ranges
|
||||
for ( auto p : summaryPlots() )
|
||||
{
|
||||
for ( auto axis : p->plotAxes( RimPlotAxisProperties::Orientation::VERTICAL ) )
|
||||
{
|
||||
axis->setRangeUserDefined( false );
|
||||
}
|
||||
}
|
||||
|
||||
setAutoValueStates();
|
||||
syncAxisRanges();
|
||||
analyzePlotsAndAdjustAppearanceSettings();
|
||||
@@ -798,6 +807,19 @@ void RimSummaryMultiPlot::zoomAll()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimSummaryMultiPlot::zoomAllAndReleaseUserDefinedRanges()
|
||||
{
|
||||
for ( auto p : summaryPlots() )
|
||||
{
|
||||
p->releaseUserDefinedAxisRanges();
|
||||
}
|
||||
|
||||
zoomAll();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user