mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
#1293 Added "Show Plot Data" to context menu of plots
This commit is contained in:
@@ -19,20 +19,25 @@
|
||||
|
||||
#include "RiuWellLogPlot.h"
|
||||
|
||||
#include "RimContextCommandBuilder.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
|
||||
#include "RiuMainWindow.h"
|
||||
#include "RiuWellLogTrack.h"
|
||||
|
||||
#include "qwt_legend.h"
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
#include "qwt_legend.h"
|
||||
|
||||
#include <QFocusEvent>
|
||||
#include <QHBoxLayout>
|
||||
#include <QMdiSubWindow>
|
||||
#include <QScrollBar>
|
||||
#include <QTimer>
|
||||
#include <QMenu>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
@@ -203,6 +208,27 @@ QSize RiuWellLogPlot::sizeHint() const
|
||||
return QSize(1,1);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuWellLogPlot::contextMenuEvent(QContextMenuEvent* event)
|
||||
{
|
||||
QMenu menu;
|
||||
QStringList commandIds;
|
||||
|
||||
caf::SelectionManager::instance()->setSelectedItem(ownerPlotDefinition());
|
||||
|
||||
commandIds << "RicShowPlotDataFeature";
|
||||
commandIds << "RicShowContributingWellsFromPlotFeature";
|
||||
|
||||
RimContextCommandBuilder::appendCommandsToMenu(commandIds, &menu);
|
||||
|
||||
if (menu.actions().size() > 0)
|
||||
{
|
||||
menu.exec(event->globalPos());
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user