mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improved context menu for well collection and analysis model
This commit is contained in:
parent
a74be74792
commit
cd686990f0
@ -223,6 +223,14 @@ void RimUiTreeView::contextMenuEvent(QContextMenuEvent* event)
|
|||||||
else if (dynamic_cast<RimWellPathCollection*>(uiItem->dataObject().p()))
|
else if (dynamic_cast<RimWellPathCollection*>(uiItem->dataObject().p()))
|
||||||
{
|
{
|
||||||
menu.addAction(QString("Delete All Well Paths"), this, SLOT(slotDeleteAllWellPaths()));
|
menu.addAction(QString("Delete All Well Paths"), this, SLOT(slotDeleteAllWellPaths()));
|
||||||
|
|
||||||
|
RiuMainWindow* ruiMainWindow = RiuMainWindow::instance();
|
||||||
|
ruiMainWindow->appendActionsContextMenuForPdmObject(uiItem->dataObject().p(), &menu);
|
||||||
|
}
|
||||||
|
else if (dynamic_cast<RimAnalysisModels*>(uiItem->dataObject().p()))
|
||||||
|
{
|
||||||
|
RiuMainWindow* ruiMainWindow = RiuMainWindow::instance();
|
||||||
|
ruiMainWindow->appendActionsContextMenuForPdmObject(uiItem->dataObject().p(), &menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute script on selection of cases
|
// Execute script on selection of cases
|
||||||
|
@ -1815,3 +1815,26 @@ void RiuMainWindow::slotOpenUsersGuideInBrowserAction()
|
|||||||
errorHandler->showMessage("Failed open browser with the following url\n\n" + usersGuideUrl);
|
errorHandler->showMessage("Failed open browser with the following url\n\n" + usersGuideUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RiuMainWindow::appendActionsContextMenuForPdmObject(caf::PdmObject* pdmObject, QMenu* menu)
|
||||||
|
{
|
||||||
|
if (!menu)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dynamic_cast<RimWellPathCollection*>(pdmObject))
|
||||||
|
{
|
||||||
|
menu->addAction(m_importWellPathsFromFileAction);
|
||||||
|
menu->addAction(m_importWellPathsFromSSIHubAction);
|
||||||
|
}
|
||||||
|
else if (dynamic_cast<RimAnalysisModels*>(pdmObject))
|
||||||
|
{
|
||||||
|
menu->addAction(m_importEclipseCaseAction);
|
||||||
|
menu->addAction(m_importInputEclipseFileAction);
|
||||||
|
menu->addAction(m_openMultipleEclipseCasesAction);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -95,6 +95,9 @@ public:
|
|||||||
|
|
||||||
void setDefaultWindowSize();
|
void setDefaultWindowSize();
|
||||||
|
|
||||||
|
void appendActionsContextMenuForPdmObject(caf::PdmObject* pdmObject, QMenu* menu);
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void closeEvent(QCloseEvent* event);
|
virtual void closeEvent(QCloseEvent* event);
|
||||||
|
|
||||||
@ -275,7 +278,6 @@ private:
|
|||||||
QAction* m_addWellCellsToRangeFilterAction;
|
QAction* m_addWellCellsToRangeFilterAction;
|
||||||
|
|
||||||
void refreshDrawStyleActions();
|
void refreshDrawStyleActions();
|
||||||
|
|
||||||
std::vector<QPointer<QDockWidget> > additionalProjectTrees;
|
std::vector<QPointer<QDockWidget> > additionalProjectTrees;
|
||||||
std::vector<QPointer<QDockWidget> > additionalPropertyEditors;
|
std::vector<QPointer<QDockWidget> > additionalPropertyEditors;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user