#2993 Ensemble. Hide 'new cross plot' ctx command for ensembles

This commit is contained in:
Bjørn Erik Jensen 2018-05-28 14:36:44 +02:00
parent 0b42c4730d
commit 4656e34967

View File

@ -65,7 +65,11 @@ bool RicNewSummaryCrossPlotFeature::isCommandEnabled()
for (auto item : selectedItems)
{
if (!dynamic_cast<RimSummaryCase*>(item) && !dynamic_cast<RimSummaryCaseCollection*>(item))
RimSummaryCase* sumCase = dynamic_cast<RimSummaryCase*>(item);
RimSummaryCaseCollection* sumGroup = dynamic_cast<RimSummaryCaseCollection*>(item);
if (sumGroup && sumGroup->isEnsemble()) sumGroup = nullptr;
if (!sumCase && !sumGroup)
return false;
}
return true;