Show flow diagnostics plots in plot window after project load

Flow plots derive from RimViewWindow, not RimPlotWindow, and were missing from RiuPlotMainWindow::viewWindows(). Applying the default dock layout on project open therefore did not re-add their dock widgets. 3D views docked in the plot window are now listed by the plot main window only, and are still activated as the active 3D view so the 3D main window toolbars (e.g. time step animation) are refreshed.
This commit is contained in:
Magne Sjaastad committed 2026-10-29 15:40:26 +01:00
1 parent d8a63a5468
commit 67427bb559
5 files changed
+66 -15

No files matched your search

@@ -860,9 +860,12 @@ std::vector<RimViewWindow*> RiuPlotMainWindow::viewWindows()
// Project can be null while it is being torn down.
if ( auto project = RimProject::current() )
{
for ( auto v : project->descendantsOfType<RimPlotWindow>() )
// Some plots (e.g. flow diagnostics plots) derive directly from RimViewWindow, and are identified by being docked in the plot
// window
for ( auto v : project->descendantsOfType<RimViewWindow>() )
{
if ( v->dockWidget() ) views.push_back( v );
if ( !v->dockWidget() ) continue;
if ( dynamic_cast<RimPlotWindow*>( v ) || v->isDockedInPlotView() ) views.push_back( v );
}
}