Guard all public entry points against null plot/data-source/curve/ensemble arguments, null-check RiaGuiApplication::instance() and RimMainPlotCollection::current() before dereferencing, and skip null curves/data sources when collecting existing data sources.
Initialize the min and max cutoffs to the data range of the selected result
when the bin range mode is set to User Defined. The previous fixed default of
[0..1] excluded most values for results like PERMX.
The data range is computed by the same statistics query as the histogram,
respecting the selected time step and an active visible-cells filter, but
without custom binning so min and max are the range of the data.
A user-defined bin range is tied to the value range of a specific result: a
range set up for FLUXNUM does not apply to PERMX. Reset the bin range mode to
Automatic and the min/max cutoffs to their defaults when another property is
selected, and reset the stale cutoffs when the user sets the bin range mode
back to Automatic.
Make the property-driven binning mode symmetric: selecting a non-logarithmic
result (e.g. FLUXNUM) after a logarithmic one (e.g. PERMX) sets the binning mode
and x-axis back to linear.
Replace the one-way logarithmicBinningEnabled signal with a binningModeChanged
signal carrying the new mode, so the x-axis scale follows the binning mode in
both directions, also when the binning mode itself is changed in the UI.
Selecting a logarithmic result manually in the grid statistics data source
property editor now enables logarithmic binning and a logarithmic x-axis, the
same as creating the plot from a 3D view.
The previously selected result variable is tracked so that only an actual
property change enables logarithmic binning: other property edits leave a
user-selected binning mode alone, and binning modes stored in project files are
kept as-is on load.
Select logarithmic binning and a logarithmic x-axis automatically when creating a
grid statistics histogram plot from a 3D view showing a logarithmic result
(RiaResultNames::isLogarithmicResult).
Show a plot info label at the top right of the plot canvas describing active data
filters: "Filter: Visible cells in 3D view" when a cell filter view is set, and
"Filter: User defined x-range [min..max]" when the bin range is user-defined. The
label collects unique filter descriptions from the data sources of all visible
curves and is removed when no filters are active.
When an ensemble is dropped on a histogram plot showing summary vector curves,
create a new curve per distinct vector and time step for the dropped ensemble,
matching the existing behavior for ensemble parameter curves.
Add a virtual RimMultiPlot::handleDroppedObjects so RiuMultiPlotBook routes drop
events to any multi plot type instead of only RimSummaryMultiPlot. Implement the
handler in RimHistogramMultiPlot: each dropped ensemble summary vector, ensemble
parameter or file set ensemble creates its own new histogram subplot, following
the behavior of the summary multi plot. Extract RimHistogramPlot::isDroppableObject
so unsupported dropped objects do not create empty subplots.
Add BinningMode (Linear/Logarithmic) and OutOfRangeHandling (Exclude/Include in
Boundary Bins) to RigHistogramCalculator, with defaulted constructor arguments so
existing callers are unaffected. All four histogram plot data sources get shared
options for binning mode and an optional user-defined bin range through new PDM
fields on RimHistogramDataSource.
The grid statistics data source computes non-default histograms through a new
non-caching RigStatisticsDataCache::computeHistogram() pass-through, leaving the
cached statistics used by the 3D overlay and the P10/P90/mean annotation lines
untouched.
Selecting logarithmic binning enables logarithmic scale on the plot X axis once,
via a new signal handled by RimHistogramCurve.
Also fix the bin index computation to use uniform bins of width range/nBins,
consistent with calculatePercentil() and the bin edges drawn by the plots. The
previous divisor (nBins - 1) shifted counts by up to one bin width relative to
the drawn bars and slightly biased histogram-based percentile estimates.
Migrate all assert macros in ApplicationLibCode to CAF_ASSERT and remove every
use of cvfAssert.h.
CVF_ASSERT is replaced one to one. CVF_TIGHT_ASSERT is also replaced by
CAF_ASSERT, which is semantically exact: CVF_ENABLE_TIGHT_ASSERTS is 1 only
under _DEBUG, and that is what CAF_ASSERT now does. The two CVF_FAIL_MSG sites
become CAF_ASSERT( false && "message" ), preserving the message with the idiom
already used elsewhere in the code base.
Counts before and after: CVF_ASSERT 1044 to 0, CVF_TIGHT_ASSERT 66 to 0,
CVF_FAIL_MSG 2 to 0, cvfAssert.h references 154 to 0.
Include handling: files that included cvfAssert.h directly now include
cafAssert.h instead, includes left dead by the migration are removed, and files
that were relying on cvfAssert.h transitively get an explicit cafAssert.h. Files
that reach cafAssert.h through another caf header are left unchanged; a missing
include here is a compile error, not a silently disabled assert.
ResultStatisticsCache links only LibCore and therefore had no path to
cafAssert.h. Add the cafPdmCore directory as a private include path rather than
linking the library, since cafAssert.h is header only.
Note that this stops these asserts from firing in Release and RelWithDebInfo,
where CVF_ASSERT was previously active.
The P10/P90/Mean annotations were tied to the visibility of the histogram curve, making it impossible to show only the cumulative curve together with the statistics lines. The annotations are now drawn by the non-cumulative curve as long as either it or its cumulative counterpart curve is visible, and the statistics settings are presented only by the non-cumulative curve.
A new "Show Cumulative Curve" checkbox on the grid statistics data source adds a cumulative curve on the right axis, in addition to the regular histogram curve. The cumulative curve shares the data source of its non-cumulative counterpart and follows all changes to it. The cumulative sum works with all frequency types and both graph types.
Remove the legacy Grid Statistics dialog (RicGridStatisticsDialog) and its context menu command, which provided the previous cumulative display.
* CMake: Remove dead CODE_HEADER_FILES variable
* CMake: Remove dead COMMAND_CODE_HEADER_FILES and COMMAND_MOC_SOURCE_FILES
* CMake: Remove dead MOC_SOURCE_FILES and FORM_FILES_CPP references
* CMake: Remove dead HEADER_FILES reference
* CMake: Delete unused CustomPCH.cmake superseded by target_precompile_headers
* Add drag'n'drop support for ensemble summary vectors and ensembles into histogram plots
* Make sure histogram plot is shown and all update signals are connected when loading a project.
* Support ensemble parameter drag'n'drop from data sources into histogram plots.
* Show ensemble parameters in data sources tree.
* Add copy/paste of histogram curves
* Re-use all existing parameters in a plot when dragging a new ensemble into it
Simplifies color handling by replacing transparency settings with opacity for curve and fill colors.
This change provides a more intuitive user experience and ensures consistent behavior across the application.
- Renames "ColorTransparency" to "ColorOpacity" for RimCurveSetAppearance.
- Introduces "CurveColorOpacity" for RimPlotCurveAppearance.
- Updates blending calculations to correctly use opacity.
- Adjusts UI slider attributes for opacity settings, including minimum, maximum and decimals.
The std::unique_ptr<RiuPlotWidget> would delete the widget when
RimHistogramPlot object was recreated. This would lead to a
double-delete since the RiuPlotWidget was already deleted by Qt
through the parent-child relationship.
Fixed by using QPointer, and leaving the cleanup to Qt.