#2162 Context menu: Move geomech new property filter to new feature

This commit is contained in:
Rebecca Cox
2017-11-29 16:25:54 +01:00
parent 89feb04b31
commit b9ff4b743b
5 changed files with 122 additions and 30 deletions

View File

@@ -250,6 +250,7 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
menuBuilder << "RicEclipsePropertyFilterNewInViewFeature";
menuBuilder << "RicGeoMechPropertyFilterNewInViewFeature";
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>(m_reservoirView.p());
if (eclipseView)
@@ -271,18 +272,6 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
}
}
RimGeoMechView* geoMechView = dynamic_cast<RimGeoMechView*>(m_reservoirView.p());
if (geoMechView)
{
RimGeoMechCellColors* cellColors = geoMechView->cellResult().p();
if (cellColors)
{
if (!viewController || !viewController->isPropertyFilterOveridden())
{
menu.addAction(QIcon(":/CellFilter_Values.png"), QString("Add Property Filter"), this, SLOT(slotAddGeoMechPropertyFilter()));
}
}
}
}
}
@@ -377,20 +366,6 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
RiuSelectionManager::instance()->deleteAllItems(RiuSelectionManager::RUI_TEMPORARY);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuViewerCommands::slotAddGeoMechPropertyFilter()
{
RimGeoMechView* geoMechView = dynamic_cast<RimGeoMechView*>(m_reservoirView.p());
if (geoMechView)
{
RimGeoMechPropertyFilterCollection* filterCollection = geoMechView->geoMechPropertyFilterCollection();
RicGeoMechPropertyFilterNewExec* propCmdExe = new RicGeoMechPropertyFilterNewExec(filterCollection);
caf::CmdExecCommandManager::instance()->processExecuteCommand(propCmdExe);
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------