mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added new grid case group on case context menu
p4#: 21024
This commit is contained in:
@@ -523,7 +523,8 @@ RimIdenticalGridCaseGroup* RimUiTreeModelPdm::addCaseGroup(const QModelIndex& it
|
||||
|
||||
caf::PdmUiTreeItem* currentItem = getTreeItemFromIndex(itemIndex);
|
||||
|
||||
if (dynamic_cast<RimIdenticalGridCaseGroup*>(currentItem->dataObject().p()))
|
||||
if (dynamic_cast<RimIdenticalGridCaseGroup*>(currentItem->dataObject().p()) ||
|
||||
dynamic_cast<RimReservoir*>(currentItem->dataObject().p()))
|
||||
{
|
||||
QModelIndex rootIndex = itemIndex.parent();
|
||||
caf::PdmUiTreeItem* rootTreeItem = currentItem->parent();
|
||||
|
||||
@@ -175,12 +175,13 @@ void RimUiTreeView::contextMenuEvent(QContextMenuEvent* event)
|
||||
menu.addAction(QString("Paste"), this, SLOT(slotPastePdmObjects()));
|
||||
menu.addAction(QString("Close"), this, SLOT(slotCloseCase()));
|
||||
menu.addAction(QString("New View"), this, SLOT(slotAddView()));
|
||||
menu.addAction(QString("New Grid Case Group"), this, SLOT(slotAddCaseGroup()));
|
||||
menu.exec(event->globalPos());
|
||||
}
|
||||
else if (dynamic_cast<RimIdenticalGridCaseGroup*>(uiItem->dataObject().p()))
|
||||
{
|
||||
QMenu menu;
|
||||
menu.addAction(QString("New Case Group"), this, SLOT(slotAddCaseGroup()));
|
||||
menu.addAction(QString("New Grid Case Group"), this, SLOT(slotAddCaseGroup()));
|
||||
menu.addAction(QString("Paste"), this, SLOT(slotPastePdmObjects()));
|
||||
menu.addAction(QString("Close"), this, SLOT(slotDeleteObjectFromPdmPointersField()));
|
||||
menu.exec(event->globalPos());
|
||||
|
||||
Reference in New Issue
Block a user