Skip to content

#15063: Histogram: Zoom all when data is filtered by 3D view visibility - #15064

Merged
magnesj merged 2 commits into
devfrom
histogram-zoom-all-3d-filter
Oct 28, 2026
Merged

magnesj merged 2 commits into
devfrom
histogram-zoom-all-3d-filter

Conversation

@magnesj

@magnesj magnesj commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

Fixes #15063

When a grid statistics histogram is filtered by 3D view visibility, zoom all in the plot when the filter view is changed or when the cell visibility in the 3D view is updated.

  • RimHistogramDataSource gets a new zoomAllRequested signal
  • RimGridStatisticsHistogramDataSource sends it after updating data for filter changes, and no longer depends on RimHistogramPlot
  • RimHistogramCurve handles the signal and calls zoomAll() on its plot

Copy/paste of a histogram curve:

  • initAfterRead() is re-run after references of a pasted curve are resolved, so the 3D view visibility filter is restored
  • The axis scale of the destination plot is set from the binning mode of the pasted curve (RimHistogramCurve::updateAxisScaleFromBinningMode())

@kriben kriben left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review (open-code-review, delegate mode). Reviewed 7/7 files, 0 skipped (100% coverage).

No critical or high-severity issues. These were checked and look fine:

  • Removing the RimHistogramPlot.h include is safe: RimHistogramDataSource.h already includes it.
  • initAfterInsert() re-runs initAfterRead() on the curve subtree. All of those (curve, grid statistics data source, RimEclipseResultDefinition, RimPlotCurveAppearance) are idempotent, and re-connecting signals does nothing.
  • Signal order is correct: dataSourceChanged is sent before zoomAllRequested.

Findings: 2 medium, 3 low (see inline comments). Low: there are no tests for the paste path. A small test that copies a curve and checks that m_property has an eclipse case set after initAfterInsert() would guard against regressions.

Zoom all when the cell filter view is changed or when the visibility in the 3D view is updated, as the visible cells can have a very different value range than the full grid.
Re-run initAfterRead() after resolving references of a pasted curve, and set the axis scale of the destination plot from the binning mode.
@magnesj
magnesj force-pushed the histogram-zoom-all-3d-filter branch from c890d7e to d82b0ac Compare October 28, 2026 13:15
@magnesj
magnesj merged commit ca70c57 into dev Oct 28, 2026
21 checks passed
@magnesj
magnesj deleted the histogram-zoom-all-3d-filter branch October 28, 2026 13:36
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.

Histogram: Zoom all when data is filtered by 3D view visibility

2 participants