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:
@@ -31,9 +31,9 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiuContextMenuLauncher::RiuContextMenuLauncher(QWidget* widget, const QStringList& commandIds) :
|
||||
RiuContextMenuLauncher::RiuContextMenuLauncher(QWidget* widget, const caf::CmdFeatureMenuBuilder& commandIds) :
|
||||
QObject(widget),
|
||||
m_commandIds(commandIds)
|
||||
m_menuBuilder(commandIds)
|
||||
{
|
||||
widget->installEventFilter(this);
|
||||
}
|
||||
@@ -46,7 +46,7 @@ bool RiuContextMenuLauncher::eventFilter(QObject* watchedObject, QEvent* event)
|
||||
if (event->type() == QEvent::ContextMenu)
|
||||
{
|
||||
QMenu menu;
|
||||
RimContextCommandBuilder::appendCommandsToMenu(m_commandIds, &menu);
|
||||
m_menuBuilder.appendToMenu(&menu);
|
||||
|
||||
if (menu.actions().size() > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user