mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Made the menu builder in RimProject handle separators.
Also rigging for Script commands and generic toggle
This commit is contained in:
@@ -2240,15 +2240,8 @@ void RiuMainWindow::customMenuRequested(const QPoint& pos)
|
||||
{
|
||||
QMenu menu;
|
||||
|
||||
std::vector<QAction*> actions;
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
app->project()->actionsBasedOnSelection(actions);
|
||||
|
||||
for (size_t i = 0; i < actions.size(); i++)
|
||||
{
|
||||
menu.addAction(actions[i]);
|
||||
}
|
||||
app->project()->actionsBasedOnSelection(menu);
|
||||
|
||||
// Qt doc: QAbstractScrollArea and its subclasses that map the context menu event to coordinates of the viewport().
|
||||
QPoint globalPos = m_projectTreeView->treeView()->viewport()->mapToGlobal(pos);
|
||||
|
||||
Reference in New Issue
Block a user