Skip to content

Keep MdiWindowController as project file keyword - #14601

Merged
magnesj merged 1 commit into
devfrom
project-file-mdi-window-controller-keyword
Aug 26, 2026
Merged

Keep MdiWindowController as project file keyword#14601
magnesj merged 1 commit into
devfrom
project-file-mdi-window-controller-keyword

Conversation

@magnesj

@magnesj magnesj commented Aug 25, 2026

Copy link
Copy Markdown
Member

Fixes #14600

The MDI to dock widget refactoring renamed the PDM class RimMdiWindowController to RimDockWindowController, and with it the class keyword written to the project file. In CAF_PDM_XML_SOURCE_INIT the first keyword is the one written to file, the remaining ones are read aliases, so dev started writing <WindowController><DockWindowController>.

Previous versions of ResInsight have no factory entry for DockWindowController. When PdmChildField::readFieldData meets an unknown class name it only fails when the field is empty at read time, and this is exactly what separates 3D views from plots:

  • Rim3dView creates the controller in its constructor, so the field is already populated. The keyword mismatch only makes the stored fields be skipped, and the view is still displayed.
  • Plots get a controller only from the project file. The factory returns null, the element is skipped, isMdiWindow() is false and no MDI subwindow is ever created, so the plot is silently invisible.

This restores MdiWindowController as the keyword written to file and keeps DockWindowController as a read alias, so project files written by intermediate dev builds still load. The dropped geometry fields are harmless, RimMdiWindowGeometry::isValid() returns false and the previous version falls back to a default subwindow size, which is the same path the 3D views already take.

Older versions of ResInsight depend on this keyword to create the window controller for plot windows. 3D views work with both keywords, because Rim3dView creates the controller in its constructor, while plots only get one from the project file. DockWindowController is kept as a read alias so project files written by recent dev builds still load.
@magnesj
magnesj merged commit d7ea435 into dev Aug 26, 2026
21 checks passed
@magnesj
magnesj deleted the project-file-mdi-window-controller-keyword branch August 26, 2026 12:42
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.

Make sure project files from latest dev can be opened in previous version

2 participants