Clear grouping for Grid Cross Plot if the grouping isn't valid when changing case

This commit is contained in:
Gaute Lindkvist
2019-03-26 11:21:25 +01:00
parent 97d71acaf8
commit 9bb657c642
2 changed files with 14 additions and 6 deletions

View File

@@ -126,14 +126,16 @@ RigEclipseCrossPlotResult RigEclipseCrossPlotDataExtractor::extract(RigEclipseCa
}
else if (groupingType == GROUP_BY_FORMATION)
{
CVF_ASSERT(activeFormationNames);
int category = 0;
size_t i(cvf::UNDEFINED_SIZE_T), j(cvf::UNDEFINED_SIZE_T), k(cvf::UNDEFINED_SIZE_T);
if (mainGrid->ijkFromCellIndex(globalCellIdx, &i, &j, &k))
if (activeFormationNames)
{
category = activeFormationNames->formationIndexFromKLayerIdx(k);
int category = 0;
size_t i(cvf::UNDEFINED_SIZE_T), j(cvf::UNDEFINED_SIZE_T), k(cvf::UNDEFINED_SIZE_T);
if (mainGrid->ijkFromCellIndex(globalCellIdx, &i, &j, &k))
{
category = activeFormationNames->formationIndexFromKLayerIdx(k);
}
result.groupValuesDiscrete.push_back(category);
}
result.groupValuesDiscrete.push_back(category);
}
else if (groupingType == GROUP_BY_RESULT)
{