mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -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()))
|
||||
{
|
||||
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
|
||||
|
@ -1815,3 +1815,26 @@ void RiuMainWindow::slotOpenUsersGuideInBrowserAction()
|
||||
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 appendActionsContextMenuForPdmObject(caf::PdmObject* pdmObject, QMenu* menu);
|
||||
|
||||
|
||||
protected:
|
||||
virtual void closeEvent(QCloseEvent* event);
|
||||
|
||||
@ -275,7 +278,6 @@ private:
|
||||
QAction* m_addWellCellsToRangeFilterAction;
|
||||
|
||||
void refreshDrawStyleActions();
|
||||
|
||||
std::vector<QPointer<QDockWidget> > additionalProjectTrees;
|
||||
std::vector<QPointer<QDockWidget> > additionalPropertyEditors;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user