#1178 Use well colors for Max Fraction Tracer

This commit is contained in:
Magne Sjaastad
2017-02-10 18:53:14 +01:00
parent 9fa772a7bc
commit b3e845ed5e
4 changed files with 58 additions and 8 deletions

View File

@@ -281,7 +281,16 @@ void RimEclipseCellColors::updateLegendData(size_t currentTimeStep)
if (this->hasCategoryResult())
{
this->legendConfig()->setNamedCategories(this->flowDiagSolution()->tracerNames());
std::vector<cvf::Color3ub> categoryColors;
std::vector<QString> tracerNames = this->flowDiagSolution()->tracerNames();
for (const auto& tracerName : tracerNames)
{
categoryColors.push_back(cvf::Color3ub(this->flowDiagSolution()->tracerColor(tracerName)));
}
this->legendConfig()->setNamedCategories(tracerNames);
this->legendConfig()->setCategoryColors(categoryColors);
}
}
else