mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2020 Move LAS files. Support for submenus and command features with custom name and user data
This commit is contained in:
@@ -79,16 +79,16 @@ RiuWellAllocationPlot::RiuWellAllocationPlot(RimWellAllocationPlot* plotDefiniti
|
||||
m_legendWidget = new RiuNightchartsWidget(this);
|
||||
new RiuPlotObjectPicker(m_legendWidget, m_plotDefinition->plotLegend());
|
||||
|
||||
QStringList commandIds;
|
||||
commandIds << "RicShowTotalAllocationDataFeature";
|
||||
new RiuContextMenuLauncher(m_legendWidget, commandIds);
|
||||
caf::CmdFeatureMenuBuilder menuBuilder;
|
||||
menuBuilder << "RicShowTotalAllocationDataFeature";
|
||||
new RiuContextMenuLauncher(m_legendWidget, menuBuilder);
|
||||
|
||||
rightColumnLayout->addWidget(m_legendWidget);
|
||||
m_legendWidget->showPie(false);
|
||||
|
||||
QWidget* totalFlowAllocationWidget = m_plotDefinition->totalWellFlowPlot()->createViewWidget(this);
|
||||
new RiuPlotObjectPicker(totalFlowAllocationWidget, m_plotDefinition->totalWellFlowPlot());
|
||||
new RiuContextMenuLauncher(totalFlowAllocationWidget, commandIds);
|
||||
new RiuContextMenuLauncher(totalFlowAllocationWidget, menuBuilder);
|
||||
|
||||
rightColumnLayout->addWidget(totalFlowAllocationWidget, Qt::AlignTop);
|
||||
rightColumnLayout->addWidget(m_plotDefinition->tofAccumulatedPhaseFractionsPlot()->createViewWidget(this), Qt::AlignTop);
|
||||
@@ -193,11 +193,11 @@ QSize RiuWellAllocationPlot::minimumSizeHint() const
|
||||
void RiuWellAllocationPlot::contextMenuEvent(QContextMenuEvent* event)
|
||||
{
|
||||
QMenu menu;
|
||||
QStringList commandIds;
|
||||
caf::CmdFeatureMenuBuilder menuBuilder;
|
||||
|
||||
commandIds << "RicShowContributingWellsFromPlotFeature";
|
||||
menuBuilder << "RicShowContributingWellsFromPlotFeature";
|
||||
|
||||
RimContextCommandBuilder::appendCommandsToMenu(commandIds, &menu);
|
||||
menuBuilder.appendToMenu(&menu);
|
||||
|
||||
if (menu.actions().size() > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user