(#407) Disable "Add property filter" for per-cell face color results

This commit is contained in:
Magne Sjaastad 2015-09-07 10:12:59 +02:00
parent 520f1fc60d
commit 4618f50e9e

View File

@ -156,7 +156,15 @@ void RiuViewerCommands::displayContextMenu(QMouseEvent* event)
RimEclipseCellColors* cellColors = eclipseView->cellResult().p();
if (cellColors)
{
menu.addAction(QString("Add property filter"), this, SLOT(slotAddEclipsePropertyFilter()));
QAction* propertyAction = new QAction(QString("Add property filter"), this);
connect(propertyAction, SIGNAL(triggered()), SLOT(slotAddEclipsePropertyFilter()));
bool isPerCellFaceResult = RimDefines::isPerCellFaceResult(cellColors->resultVariable());
if (isPerCellFaceResult)
{
propertyAction->setEnabled(false);
}
menu.addAction(propertyAction);
}
// Hide faults command