#1813 Observed data: Remove right click options if any object in selection is an observed data

This commit is contained in:
Rebecca Cox
2017-09-19 14:47:36 +02:00
parent 1eecef9f72
commit fe1dfebea2
4 changed files with 53 additions and 4 deletions

View File

@@ -77,7 +77,19 @@ bool RicCloseSummaryCaseFeature::isCommandEnabled()
std::vector<RimSummaryCase*> selection;
caf::SelectionManager::instance()->objectsByType(&selection);
return (selection.size() > 0 && !selection[0]->isObservedData());
if (selection.size() == 0)
{
return false;
}
for (RimSummaryCase* summaryCase : selection)
{
if (summaryCase->isObservedData())
{
return false;
}
}
return true;
}
//--------------------------------------------------------------------------------------------------