diff --git a/ApplicationLibCode/UserInterface/RiuWellAllocationPlot.cpp b/ApplicationLibCode/UserInterface/RiuWellAllocationPlot.cpp index 8717cd2210..c2d236604f 100644 --- a/ApplicationLibCode/UserInterface/RiuWellAllocationPlot.cpp +++ b/ApplicationLibCode/UserInterface/RiuWellAllocationPlot.cpp @@ -74,21 +74,27 @@ RiuWellAllocationPlot::RiuWellAllocationPlot( RimWellAllocationPlot* plotDefinit mainLayout->addLayout( plotWidgetsLayout ); plotWidgetsLayout->addLayout( leftColumnLayout ); - m_legendWidget = new RiuNightchartsWidget( this ); - new RiuPlotObjectPicker( m_legendWidget, m_plotDefinition->plotLegend() ); - caf::CmdFeatureMenuBuilder menuForSubWidgets; menuForSubWidgets << "RicShowTotalAllocationDataFeature"; - new RiuContextMenuLauncher( m_legendWidget, menuForSubWidgets ); - leftColumnLayout->addWidget( m_legendWidget ); - m_legendWidget->showPie( false ); + { + QWidget* totalFlowAllocationWidget = m_plotDefinition->totalWellFlowPlot()->createViewWidget( this ); + new RiuPlotObjectPicker( totalFlowAllocationWidget, m_plotDefinition->totalWellFlowPlot() ); + new RiuContextMenuLauncher( totalFlowAllocationWidget, menuForSubWidgets ); - QWidget* totalFlowAllocationWidget = m_plotDefinition->totalWellFlowPlot()->createViewWidget( this ); - new RiuPlotObjectPicker( totalFlowAllocationWidget, m_plotDefinition->totalWellFlowPlot() ); - new RiuContextMenuLauncher( totalFlowAllocationWidget, menuForSubWidgets ); + leftColumnLayout->addWidget( totalFlowAllocationWidget, Qt::AlignTop ); + } + + { + m_legendWidget = new RiuNightchartsWidget( this ); + new RiuPlotObjectPicker( m_legendWidget, m_plotDefinition->plotLegend() ); + + new RiuContextMenuLauncher( m_legendWidget, menuForSubWidgets ); + + leftColumnLayout->addWidget( m_legendWidget ); + m_legendWidget->showPie( false ); + } - leftColumnLayout->addWidget( totalFlowAllocationWidget, Qt::AlignTop ); leftColumnLayout->addWidget( m_plotDefinition->tofAccumulatedPhaseFractionsPlot()->createViewWidget( this ), Qt::AlignTop ); leftColumnLayout->addStretch();