Skip to content

#14539 Summary Plot: Preserve user defined axis ranges when the data source changes - #14605

Draft
magnesj wants to merge 1 commit into
devfrom
14539-preserve-user-defined-axis-ranges
Draft

#14539 Summary Plot: Preserve user defined axis ranges when the data source changes#14605
magnesj wants to merge 1 commit into
devfrom
14539-preserve-user-defined-axis-ranges

Conversation

@magnesj

@magnesj magnesj commented Aug 25, 2026

Copy link
Copy Markdown
Member

Fixes #14539

A user defined axis range is now treated as a persistent setting on the axis, and is kept when the data source of a summary plot changes. This covers adding a summary case to an ensemble, reloading a summary case, and replacing a summary case or an ensemble, and also the existing stepping between wells, groups, regions and realizations.

How an axis range becomes user defined

RimPlotAxisPropertiesInterface has a new persisted field IsRangeUserDefined. It is set when the user edits Min/Max in the axis property panel, unchecks "Set Range Automatically", or zooms/pans interactively in the plot. For the numerical axis the flag is derived from the auto value state of the Min/Max field, so toggling the field back to auto value clears the flag instead of setting it.

How the range is preserved

RimSummaryPlot::setAutoScaleXEnabled/YEnabled( true ) skips axes with a user defined range. This is the single choke point for all zoomAll() paths, so all the automatic zoom operations triggered from RimSummaryEnsemble::addCase, RiaSummaryTools::reloadSummaryCaseAndUpdateConnectedPlots and RiaSummaryTools::updateConnectedPlots leave the range untouched. In addition, RimPlotAxisProperties::enableAutoValueMinMax no longer re-enables the auto value for a user defined axis, so the Y axis range aggregation modes of a summary multi plot cannot overwrite the range either.

How the range is released

RimViewWindow::zoomAllAndReleaseUserDefinedRanges() is a new virtual that defaults to zoomAll() and is overridden by RimSummaryPlot and RimSummaryMultiPlot to clear the flags first. It is used by the Zoom All command (Ctrl+Alt+A, toolbar and context menu) and by double click in a plot. The range is also released by checking "Set Range Automatically" for the axis, or by changing the Y Axis Range aggregation of a summary multi plot.

Not included

The issue suggests a lock icon in the user interface for the two axes. This PR implements the behaviour without the icon, using the existing "Set Range Automatically" toggle as the visible per axis control. Say the word if the lock icon should be added on top of this.

@magnesj magnesj self-assigned this Aug 26, 2026
…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.
@magnesj
magnesj force-pushed the 14539-preserve-user-defined-axis-ranges branch from 365d1c6 to 33bd807 Compare August 27, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preserve User-Defined Plot Axis Ranges When Adding, Reloading, or Replacing Summary Cases and Ensembles

1 participant