Commit Graph
2 Commits
Author SHA1 Message Date
Magne Sjaastad 9ac6ad3bec #14903: Avoid duplicate dock window ids for copied plots
Copies and plots created from templates kept the source DockWindowId. The dock
manager identifies dock widgets by name, so the earlier dock widget was deleted on
dock state restore, leaving a dangling pointer that crashed in setActiveViewer.

- Do not copy DockWindowId; copies get a new id
- Assign a new id if a dock widget with the same name exists
- Use QPointer for the dock widget
2026-10-12 18:49:08 +02:00
Magne Sjaastad 7f99498072 Fix crash in RimDockWindowController when view widget creation fails
Guarded two unconditional null derefs: dockWidget->setWidget(viewWidget) when viewWidget creation fails, and viewPdmObject() in handleViewerDeletion() when no view has ever been assigned to control. Added regression test for the handleViewerDeletion() case; the setWidget() path requires a running GUI/main window and isn't reachable from the headless unit test harness.
2026-10-05 19:56:10 +02:00