mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#829 Ordered the legend for formation names in the natural top to bottom order
This commit is contained in:
@@ -423,15 +423,7 @@ void RimGeoMechView::updateLegends()
|
||||
if (cellResult()->hasCategoryResult())
|
||||
{
|
||||
const std::vector<QString>& fnVector = gmCase->femPartResults()->activeFormationNames()->formationNames();
|
||||
std::vector<int> nameIndices;
|
||||
std::vector<cvf::String> names;
|
||||
for (int i = 0; i < fnVector.size(); ++i)
|
||||
{
|
||||
nameIndices.push_back(i);
|
||||
names.push_back(cvfqt::Utils::toString(fnVector[i]));
|
||||
}
|
||||
|
||||
cellResult()->legendConfig->setCategoriesWithNames(nameIndices, names);
|
||||
cellResult()->legendConfig->setNamedCategoriesInverse(fnVector);
|
||||
}
|
||||
|
||||
m_viewer->addColorLegendToBottomLeftCorner(cellResult()->legendConfig->legend());
|
||||
|
||||
Reference in New Issue
Block a user