#1520 Use green and red colors for cells with and without perforations, respectively

This commit is contained in:
Bjørnar Grip Fjær
2017-06-01 12:55:13 +02:00
parent 5208815622
commit 8e6322b500

View File

@@ -384,12 +384,17 @@ void RimEclipseCellColors::updateLegendData(size_t currentTimeStep)
} }
else if (this->resultType() == RimDefines::DYNAMIC_NATIVE && this->resultVariable() == RimDefines::completionTypeResultName()) else if (this->resultType() == RimDefines::DYNAMIC_NATIVE && this->resultVariable() == RimDefines::completionTypeResultName())
{ {
std::vector<QString> ctNames; std::vector< std::tuple<QString, int, cvf::Color3ub> > categories;
for (QString ctName : caf::AppEnum<RimDefines::CompletionType>::uiTexts())
{ caf::AppEnum<RimDefines::CompletionType> wellPath(RimDefines::WELL_PATH);
ctNames.push_back(ctName); caf::AppEnum<RimDefines::CompletionType> fishbone(RimDefines::FISHBONE);
} caf::AppEnum<RimDefines::CompletionType> perforationInterval(RimDefines::PERFORATION_INTERVAL);
this->legendConfig()->setNamedCategoriesInverse(ctNames);
categories.push_back(std::make_tuple(wellPath.uiText(), wellPath.index(), cvf::Color3::RED));
categories.push_back(std::make_tuple(fishbone.uiText(), fishbone.index(), cvf::Color3::DARK_GREEN));
categories.push_back(std::make_tuple(perforationInterval.uiText(), perforationInterval.index(), cvf::Color3::GREEN));
legendConfig()->setCategoryItems(categories);
} }
else else
{ {