#811, #812 WIP, Formation names coloring of cells. First shot. Works but needs refinment.

This commit is contained in:
Jacob Støren
2016-09-06 10:27:30 +02:00
parent ca6e650a72
commit c903e87dfd
28 changed files with 373 additions and 50 deletions

View File

@@ -74,6 +74,7 @@
#include <QMessageBox>
#include <limits.h>
#include "RigFormationNames.h"
@@ -990,7 +991,20 @@ void RimEclipseView::updateMinMaxValuesAndAddLegendToView(QString legendLabel, R
{
size_t adjustedTimeStep = m_currentTimeStep;
if (resultColors->hasStaticResult()) adjustedTimeStep = 0;
resultColors->legendConfig()->setCategories(cellResultsData->uniqueCellScalarValues(resultColors->scalarResultIndex()), cellResultsData->uniqueCellScalarValues(resultColors->scalarResultIndex(), adjustedTimeStep));
if(resultColors->resultType() != RimDefines::FORMATION_NAMES)
{
resultColors->legendConfig()->setCategories(cellResultsData->uniqueCellScalarValues(resultColors->scalarResultIndex()),
cellResultsData->uniqueCellScalarValues(resultColors->scalarResultIndex(), adjustedTimeStep));
}
else
{
const std::vector<QString>& fnVector =
eclipseCase()->reservoirData()->activeFormationNames()->formationNames();
std::set<int> nameIndices;
for(int i = 0; i < fnVector.size(); ++i) nameIndices.insert(i);
resultColors->legendConfig()->setCategories(nameIndices, nameIndices);
}
}
m_viewer->addColorLegendToBottomLeftCorner(resultColors->legendConfig()->legend());