mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1813 Observed data: Remove right click options if any object in selection is an observed data
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user