Commit Graph
683 Commits
Author SHA1 Message Date
Jon Jenssen aa9edc43bb Work in progress 2026-06-17 13:55:32 +02:00
jonjenssen cc9a075fc6 Testing 2026-06-17 13:55:32 +02:00
Magne Sjaastad 7f24637fa7 Show grid statistics context menu items only when clicking inside overlay info box 2026-06-11 16:29:04 +02:00
Magne Sjaastad 22f9053401 #14193 Guard additional null sub-accessor derefs in pick handling
findCellAndGridIndex and ijkFromCellIndex shared the same latent
null-pointer pattern as the context menu crash: the outer case/view was
null-checked, but a sub-accessor that can also return nullptr was
dereferenced without a guard. These are reachable from the same pick and
context-menu flow when a case is still loading, in a comparison view, or
being torn down.

- findCellAndGridIndex: guard mainGrid() and geoMechData()
- ijkFromCellIndex: guard eclipseCaseData() (matching isRadialGrid) and
  femParts()
2026-06-10 08:46:39 +02:00
Magne Sjaastad 50c9d3f446 #14193 Fix crash in context menu when Eclipse view has no main grid
RiuViewerCommands::displayContextMenu called
eclipseView->mainGrid()->findFaultFromCellIndexAndCellFace() without
checking the result of mainGrid(). When the view's case or case data is
not available, mainGrid() returns nullptr, and the call dereferenced the
null pointer inside findFaultFromCellIndexAndCellFace (caught in the
stack trace as cvf::ref<RigFaultsPrCellAccumulator>::isNull).

Guard the call with a null check on mainGrid(), matching the existing
pattern used elsewhere in this file.
2026-06-10 08:46:39 +02:00
Magne Sjaastad 5dae9a0a19 #14104 Fix property dialogs opening collapsed on multi-monitor setups
The export property dialogs that rely solely on sizeHint() could open collapsed when shown on a screen whose DPI differs from the screen they were built on. Recompute the layout on first show, after the dialog is associated with its destination screen, by calling adjustSize() in showEvent when no stored size is restored. Also give RiuPropertyViewTabWidget a minimum size floor so the inner scroll area's artificially small minimum width cannot collapse the dialog.
2026-06-08 16:32:36 +02:00
Magne Sjaastad 1989f93440 #14104 Store dialog size as plain width/height instead of binary geometry
Replace the binary QWidget::saveGeometry()/restoreGeometry() encoding used by PdmUiPropertyViewDialog and RiuPropertyViewTabWidget with plain integer width and height values in QSettings, restored with resize(). The stored values are human-readable and not tied to Qt internal geometry-stream version. Only the size is persisted; the window position is left to the window manager to avoid restoring dialogs off-screen or on a disconnected monitor.
2026-06-08 16:32:36 +02:00
Magne Sjaastad 091ae0d810 Plot Window: remove Import Grid Model action from the Standard toolbar 2026-06-08 10:44:16 +02:00
Kristian Bendiksen 2a158dce58 #14121 Well Path: guard remaining null wellPathGeometry() dereferences
A file-based well path whose source file is missing has a null wellPathGeometry(). Add null checks at the remaining call sites that dereferenced it without one, so operations on such a well path no longer crash:

- RimWellPathGroup: skip geometry merging for a child with no geometry (grouping runs on import and project load).
- RimWellPathFracture::computeFractureDirectionNormal: return undefined when geometry is missing.
- RivWellPathPartMgr: extend the existing well path null checks to also require geometry in the attribute, well measurement, and valve append paths.
- RimCompletionCellIntersectionCalc, RicExportLgrFeature, RicCreateMultipleWellPathLaterals, RigLasFileExporter, RiuWellPathComponentPlotItem: guard the geometry before use.

Sites that were already guarded or only reachable through guarded paths were left unchanged.
2026-06-08 08:46:40 +02:00
Magne Sjaastad c6591eac95 Summary plot: select plot before building the right-click context menu
Select the summary plot as the current item before any menu commands are
created, so every command in the context menu operates on that plot. This is
the root fix for plot-level commands (New Analysis Plot, correlation plots,
etc.) that derive their enablement from the selected plot: previously the
selection could be left on an ensemble realization's summary case, disabling
them.

Because the plot is now selected, the Show Plot Data / Edit Plot / Split / Delete
commands resolve the plot from the selection, so passing it as user data is no
longer needed. The RicShowPlotDataCtxFeature and RicEditSummaryPlotCtxFeature
subclasses existed only to force isCommandEnabled to true for the context menu;
they are now obsolete and removed, and the menu uses the base RicShowPlotData
and RicEditSummaryPlot features directly.

Also highlight the curve under the cursor before showing the menu, giving the
same visual feedback as a left-click. Separate highlighting from selection:
extract the visual-only part of selectClosestPlotItem into
applyHighlightForClosestItem, shared by selectClosestPlotItem (left-click:
highlight + select) and the new highlightClosestPlotItem (highlight only). The
context menu uses the highlight-only path, so it does not change the selection.
Add highlightClosestPlotItemAtPosition that takes widget coordinates and
converts them to canvas coordinates internally, so the caller does not depend
on qwt headers.
2026-06-05 16:10:49 +02:00
Magne Sjaastad 8606fa002e #14104 Remember user-defined size of property and preferences dialogs
Persist the geometry of PdmUiPropertyViewDialog and RiuPropertyViewTabWidget to the application settings on close and restore it on the next show. Restoring is done in showEvent rather than the constructor so it is applied reliably for a modal dialog. The settings key includes the bound object class keyword so distinct dialogs that share a window title do not collide.

This behaviour is gated behind a new "Remember Dialog Size" experimental feature, disabled by default. PdmUiPropertyViewDialog cannot access RiaPreferencesSystem, so the application pushes the current setting via the static enableGeometryPersistence(), following the existing pattern used for class-name display. RiuPropertyViewTabWidget queries the feature directly.
2026-06-04 21:06:38 +02:00
Kristian Bendiksen 421b35121a #14105 Tornado plots: sort realizations numerically (natural order)
Use a numeric-aware QCollator in RiuGroupedBarChartBuilder::BarEntry::operator< so that tick and legend texts containing numbers (e.g. realization-2 vs realization-10) sort in natural numerical order instead of lexicographically.

Fixes #14105
2026-06-04 10:40:43 +02:00
Kristian Bendiksen 80e7d64332 #14099 Move export dock layout action back to developer features
Revert 380b471. The 'Export Layout to Clipboard' window menu action is a developer-only utility, not an experimental feature. Gate it behind RiaApplication::enableDevelopmentFeatures() again and drop the 'export-dock-layout' experimental feature registration.
2026-06-03 14:04:27 +02:00
Kristian Bendiksen 380b471bb5 Move export dock layout action to experimental features
Gate the 'Export Layout to Clipboard' window menu action behind the experimental
features registry instead of RiaApplication::enableDevelopmentFeatures(). Register
the 'export-dock-layout' feature and drop the now-unused RiaApplication include.
2026-06-01 16:41:00 +02:00
Kristian Bendiksen a0e502f75e Move OSDU well logs and undo/redo view to experimental features
Gate the OSDU well log import menu item and the command undo/redo history view
behind the discoverable experimental features registry instead of
RiaApplication::enableDevelopmentFeatures(), so they can be toggled from
Preferences -> System without setting the RESINSIGHT_DEVEL environment variable.

Register the 'osdu-well-logs' and 'undo-redo-view' features in
RiaExperimentalFeatures and gate the code paths via
RiaPreferencesSystem::isFeatureEnabled().
2026-06-01 16:41:00 +02:00
Magne Sjaastad 022d77bef8 macOS: Initial Apple Silicon and x86_64 build support
* Refactor: add MACOSX_BUNDLE option to qt_add_executable in multiple CMakeLists.txt files
* #14045 macOS: Guard std::stacktrace usage and skip ucontext on Apple platforms
* #14045 macOS: Guard std::ispanstream with std::istringstream fallback
* #14045 macOS: Add vcpkg overlay triplets for osx and exclude grpc on osx
* #14045 macOS: CMake macOS build support and openzgy OpenMP-disable patch
* #14045 CI: Add macOS build workflow
* #14045 macOS: Use feature-test macros to detect <stacktrace> and <spanstream>
* #14045 macOS: Make MAX_STIMPLAN_LAYERS constexpr to fix arm64 link error
* #14045 CI: Ship README-macOS.txt with artifact to document Gatekeeper workaround
* #14045 CI: Pin macOS runner to macos-14 and set deployment target to 14.0
* #14045 CI: Move macOS runner to macos-15 and fix README step on configure failure
2026-06-01 12:38:55 +02:00
Magne Sjaastad a8306ebb81 #14077 Add umbrella Import Simulation Grid feature for GRID/EGRID, GRDECL, and ROFF 2026-05-29 14:00:49 +02:00
Magne Sjaastad 2f8ec77851 #14061 Reorder user interface for summary/grid ensemble import
* Agent docs: Recommend cmake --build over ninja when sharing build/ with Visual Studio
* Disable Create Well Target Mapping for grid ensembles with individual grids
* Move RimSummaryCaseMainCollection context menu items into appendMenuItems override
* Reorganize import menus: split per-window, group submenus, rename actions, add Import/Export icons
* Show icons on "New Statistics Case" and "New Grid Case Group" menu actions
* Rename grid/summary import submenus to "More" and use the import icon
2026-05-28 16:06:39 +02:00
Magne Sjaastad 071d6cc19e #14050 CMake: Remove dead variable definitions and references
* 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
2026-05-26 13:10:20 +02:00
jonjenssen 379741b1d5 Add nullptr guard to avoid crash when looking at odb data 2026-05-22 06:57:48 +02:00
Kristian Bendiksen 20087c6dd9 #13997 3dView: Show active filter name(s) below Z-scale indicator
Adds a new HUD label in the upper-left of the 3D view that reads
"Filter : <name(s)>" whenever a cell, property, or per-view data
filter is active. The label is hidden when nothing is enabled.

Names are joined per the source collection's AND/OR combine mode, and
contributions from different collections are concatenated with ", ".
On Eclipse views the unified RimFilterInViewCollection is used as the
single anchor; GeoMech views aggregate cell and GeoMech property
filters directly.
2026-05-20 14:16:04 +02:00
Kristian Bendiksen 90c7bcf743 #14008 MultiPlotPage: Avoid abort on stale visible-index mapping
Nested Qt event processing during toolbar clearing can trigger
performUpdate while the visible-index-to-position mapping is out of
sync with the current visible plot widgets. The lookup lambda in
alignAxis previously asserted on a miss, calling abort() which the
SIGABRT handler reported as a crash. Return std::optional and skip
widgets without a mapping entry instead, matching the defensive
null-pointer style used elsewhere in this file.

Fixes #14008.
2026-05-18 21:48:13 +02:00
Kristian Bendiksen 5ffcb69acc #13126 RiaLogging: Use std::string_view instead of QString for logging 2026-05-08 10:11:09 +02:00
Kristian Bendiksen bb0afbf962 #13126 RiaLogging: Extract errorInMessageBox to RiuMessageDialog
Move the QMessageBox-displaying helper out of the logging utility into a
dedicated UI class. RiaLogging.h no longer pulls QMessageBox/QWidget into
the ~270 files that include it. Behavior is preserved: showError displays
the dialog when running interactively (and not under regression tests),
then forwards the text to RiaLogging::error.
2026-05-08 10:11:09 +02:00
Magne Sjaastad aac21b071b #13942 SummaryQwtPlot: Guard remaining QPointer dereferences 2026-05-04 15:28:08 +02:00
Magne Sjaastad 4f941c3ef2 #13938 SummaryMultiPlot: Guard against null curve point tracker 2026-05-04 15:27:50 +02:00
Kristian Bendiksen 663142be71 Sector export: Exclude refinement region wireframe from mouse picking
Skip pick items with no cvf source info in both pick paths
(displayContextMenu and findFirstItems). Without this, the refinement
region wireframe — which has no source info — became the topmost hit,
causing the picking handler to bail out and leaving Result Info empty
instead of falling through to the underlying cell.
2026-04-29 13:14:49 +02:00
Magne Sjaastad bd3836ba25 #13901 ShowPlotData: Invert dependencies via capability mixins and text-dialog signal 2026-04-20 14:09:25 +02:00
Magne Sjaastad 4dfe238fef Summary: Keep curves in other ensembles unchanged when highlighting a realization 2026-04-20 10:52:02 +02:00
Magne Sjaastad 387b19ef62 #12276 Add RFT correlation report plot with cross-plot and tornado plot
* Fix defensive guards and TVD interpolation

Guard against out-of-bounds IJK and invalid cells in RifReaderRftInterface.
Guard against null eclCase in RimDataSourceForRftPlt::address.
Guard against null plot widgets in RiuMultiPlotPage.
Fix interpolateMdFromTvd corrupting valid entries after infinity TVD values
by skipping infinity entries in the first pass and tracking only the last
two valid MD values for the startMD adjustment.

* Add RiuQwtCurveSelectorFilter for click-to-select realization in Qwt plots

New shared event filter class that installs on a QwtPlot canvas and calls a
user-supplied callback with the closest data point on each click.

Migrate the local CurveSelectorFilter in RimParameterResultCrossPlot to use
the new shared class. Add Z_HIGHLIGHTED_CURVE to ZIndex enum and replace all
raw z-order integers in RiuQwtPlotCurveDefines with named constants.

* Add RFT correlation report plot with cross-plot and tornado plot

New classes:
- RimRftCorrelationReportPlot: composite plot showing an RFT well log track
  alongside a parameter cross-plot and a tornado plot sub-plot.
- RimParameterRftCrossPlot: cross-plot of ensemble parameters vs RFT-derived
  measured depth values, with click-to-select realization support.
- RimRftTornadoPlot: tornado plot with correlation-sorted parameter list and
  click-to-select realization support.
- RicCreateRftCorrelationReportFeature: context menu command on RimWellRftPlot
  that creates a RimRftCorrelationReportPlot in the correlation plot collection.

Wire up in RimCorrelationPlotCollection and RimContextCommandBuilder.

* Add click-to-select and highlight selected realization in RFT plots

Install RiuQwtCurveSelectorFilter on RimWellRftPlot canvas to support
click-to-select realization. Highlight the selected realization using a
contrast color (orange-red) and increased line thickness. React to both
click-to-select in the plot and selection changes in the Data Sources panel.

Add Z_HIGHLIGHTED_CURVE z-order and replace raw z-order integers with
named constants in RimWellRftPlot.

Highlight selected realization with XCROSS symbol in RimParameterRftCrossPlot
via RimSummaryEnsembleTools::findSummaryCase.

* RimWellRftPlot: add Create RFT Correlation Report to canvas right-click menu

Override appendMenuItems in RimWellRftPlot to add RicCreateRftCorrelationReportFeature.
Call appendMenuItems from RiuMultiPlotPage::contextMenuEvent so any plot type
can contribute canvas menu items without modifying RiuMultiPlotPage.

* RicShowPlotDataFeature: support RimRftCorrelationReportPlot

Add RimRftCorrelationReportPlot to the isCommandEnabled check and expand
it into its cross-plot and tornado sub-plots in onActionTriggered, matching
the pattern used for RimCorrelationReportPlot.
2026-04-16 16:45:44 +02:00
Magne Sjaastad 20c8888cba Add unit tests for RiuQwtLinearScaleEngine scale division methods 2026-04-09 15:18:36 +02:00
Magne Sjaastad 2f63230c61 Refactor CorrelationReportPlot: replace showSummaryPlot/AddressSelector with child visibility and dock title bar toggle
- Remove RimSummaryAddressSelector; sync summary plot address directly from curve definitions
- Add defineUiTreeOrdering to expose sub-plots as tree children with showWindow toggle
- Dock widgets now reflect showWindow() state and close signal updates the model
- Add m_showDockTitleBars field to toggle dock area title bar visibility
- Update auto plot title for correlation matrix to 'Pearson Correlation'
2026-04-09 15:18:36 +02:00
Magne Sjaastad f96e509c05 Add click-to-select realization in ParameterResultCrossPlot
Clicking near a data point in the cross plot selects the closest
summary case in the plot main window data source tree view.
2026-04-09 15:18:36 +02:00
Magne Sjaastad 125200bf5b #8218 Mac: Pre-populate Windows menu to fix missing menu on macOS
On macOS, the native menu bar hides empty menus. The Windows menu was
populated lazily via aboutToShow, but since it was empty at creation
time macOS never rendered it, so the signal could never fire.

Fix by calling slotBuildWindowActions() after createDockPanels() in
both RiuMainWindow and RiuPlotMainWindow constructors.
2026-04-08 10:57:34 +02:00
Kristian Bendiksen a0dbbf6cb1 Remove deprecated size_t overloads from RigActiveCellInfo
Migrate all callers to use type-safe ReservoirCellIndex and
ActiveCellIndex wrappers, then remove the deprecated isActive(size_t),
cellResultIndex(size_t), and setCellResultIndex(size_t, size_t) methods.
2026-03-31 12:32:05 +02:00
Kristian Bendiksen 2374301385 #3284 Mohr's Circle: fix off-by-one in IJK display
Use caf::VecIjk0 in MohrsCirclesInfo and convert to VecIjk1 for
display, matching the 1-based indexing used in the 3D view.

Fixes #3284.
2026-03-30 17:02:48 +02:00
Magne Sjaastad c49b6986c0 CorrelationReportPlot: Refinements, fixes, and simplifications
- Use RimViewWindow in RiuCorrelationReportPlotWidget constructor
- Update default dock layout to match desired screenshot
- Generalize context menu selection fixer to use caf::PdmObject
- Simplify code, fix event filter lifetime, plot titles, and disable summary plot zoom

RiuSummaryQwtPlot: Add missing override keyword to setZoomEnabled
2026-03-30 12:06:57 +02:00
Magne Sjaastad d64dcefc07 CorrelationReportPlot: Add optional summary plot with ADS dock manager layout
- Add optional summary plot in upper right corner
- Replace fixed grid layout with ADS dock manager for flexible layout
- Show plot titles and set splitter width to 1px
- Use setupBeforeSave to persist dock layout state
2026-03-30 12:06:57 +02:00
Magne Sjaastad 6ff75e3700 SummaryMultiPlot: Improve sub-plot stepping and duplicate plot handling 2026-03-18 13:54:06 +01:00
Magne Sjaastad b229417f7c Add comment explaining manual layout deletion in RiuWellLogPlot destructor
Only one of the two scroll bar layouts gets reparented via addLayout()
depending on orientation; the other has no parent and must be explicitly
deleted. Add comment to clarify why both are deleted explicitly.
2026-03-17 14:03:11 +01:00
Magne Sjaastad b7b2a73721 Add context menu actions to hide/show all geometry for well visibility
Two new actions added to the well path context menu:
- "Hide All Geometry (Show Wells)": hides grid cells, faults, and intersections,
  then forces simulation wells and well paths visible.
- "Show All Geometry": restores grid cells, faults, and intersections visibility.

Added RimIntersectionCollection::setActive() for direct state control.
2026-03-16 16:14:08 +01:00
Magne Sjaastad 4f022aee72 RiuRecentFileActionProvider: Normalize path separator to avoid duplicates
Use QDir::fromNativeSeparators before storing or removing file names to
ensure paths with mixed separators are treated as the same entry.
2026-03-16 14:00:21 +01:00
Magne Sjaastad 5d65057d6f RiuRecentFileActionProvider: Track last used project file via recent file list
Remove lastUsedProjectFileName from RiaPreferences and store it via the
existing recentFileList QSettings key. loadProject and saveProjectAs now
call addToRecentFiles instead of writing to preferences. A new static
method lastUsedProjectFileName() on RiuRecentFileActionProvider returns
the most recent .rsp entry from the list.
2026-03-11 12:46:43 +01:00
Magne Sjaastad 9b5507611f RiuMainWindow: Add Test Progress Bar to Testing menu
Adds a "Test Progress Bar" action under File->Testing that runs a
long task on a worker thread using caf::ProgressInfo to exercise
cross-thread progress updates. Uses QEventLoop to keep the GUI thread
responsive while the worker sleeps between steps.
2026-03-10 15:32:02 +01:00
Magne Sjaastad a94c1235c6 #13715 RiuSummaryVectorSelectionUi: Create addresses for all realizations in Plot Editor
For ensemble member cases used as individual sources in the Plot Editor,
createAddressesIfRequired() was never called, causing allResultAddresses()
to return an empty set for all non-representative realizations.
2026-03-10 11:56:38 +01:00
Magne Sjaastad 0ebb81ff87 RiuMainWindow: Trigger actual crash in test telemetry
- Replace manual telemetry event reporting with an intentional SIGSEGV
- This allows for testing the end-to-end crash reporting pipeline and signal handling instead of just simulating telemetry data
2026-03-09 15:34:39 +01:00
Magne Sjaastad fd27722991 RicImportGridAndSummaryEnsembleFeature: Add feature for importing grid and summary ensembles
- Add RicImportGridAndSummaryEnsembleFeature with icon and menu/toolbar registration
- Register in main window toolbar, import menu (both windows)
- Add feature to plot window Standard toolbar
- Wire up post-import view and plot creation
- Skip grid/summary ensemble creation when no files of that type are found
- Keep focus in plot window when no grid ensembles are created
2026-03-09 14:43:02 +01:00
Magne Sjaastad 601a3bbb78 Refactor RigFormationNames
- Rename RifColorLegendData to RifFormationNamesReader to better reflect the
class purpose of reading formation names from .lyr files.
- Remove inheritance of cvf::Object
- Improve const correctness
2026-02-27 14:17:21 +01:00
Magne Sjaastad 896e960e58 #13558 Help menu: Add "What's New" item linking to release notes
Adds a new menu item "What's New" to the Help menu that opens the
release notes page at https://resinsight.org/releases/release-notes/latest/.
Includes a new star-shaped SVG icon matching the existing help icon style.

Consolidate all urls into constants in RiaNetworkTools
2026-02-26 08:23:53 +01:00
Magne Sjaastad 441a0d4338 Enhances dual porosity result display and plotting
Improves the handling and display of dual porosity results by:

- Adds an option to display a dual porosity label in the UI tree, clarifying the porosity model being used.
- Adjusts the K index calculation for the fracture porosity model in relative permeability plots, ensuring correct indexing.
- Adds a warning message when plotting relative permeability curves for fracture cells since it is not fully supported.
- Replaces direct checks for dual-porosity results with checks against the main grid to determine dual porosity for UI element display.
2026-02-20 09:27:20 +01:00