#14602 Summary: Keep the summary toolbar active for child objects of a multi plot

The toolbar is only shown when the active plot view window is a multi plot. When a child object is selected, the first ancestor view window is the sub plot, so the toolbar was cleared and hidden.

Use the summary multi plot as active plot view window when any object inside the multi plot is selected.
This commit is contained in:
Magne Sjaastad
2026-08-27 10:16:06 +02:00
parent 61117162da
commit 5edefe4ad7
@@ -915,6 +915,11 @@ void RiuPlotMainWindow::selectedObjectsChanged( caf::PdmUiTreeView* projectTree,
if ( auto multiSummaryPlot = firstSelectedObject->firstAncestorOrThisOfType<RimSummaryMultiPlot>() )
{
// The toolbar shows fields from the summary multi plot. When a child object is selected, the first
// ancestor view window is the sub plot, not the multi plot. Use the multi plot as active plot view
// window to make sure the toolbar is available for any object in the multi plot.
m_activePlotViewWindow = multiSummaryPlot;
setBlockViewSelectionOnSubWindowActivated( true );
setActiveViewer( multiSummaryPlot->dockWindowName() );
setBlockViewSelectionOnSubWindowActivated( false );