mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fixed #1316
This commit is contained in:
parent
2bc9ba3e8e
commit
bfedfe9c30
@ -462,15 +462,19 @@ void RimEclipseWellCollection::fieldChangedByUi(const caf::PdmFieldHandle* chang
|
||||
void RimEclipseWellCollection::assignDefaultWellColors()
|
||||
{
|
||||
const caf::ColorTable& colorTable = RiaColorTables::wellsPaletteColors();
|
||||
cvf::Color3ubArray catColors = colorTable.color3ubArray();
|
||||
cvf::Color3ubArray interpolatedCatColors = caf::ColorTable::interpolateColorArray(catColors, wells.size());
|
||||
cvf::Color3ubArray wellColors = colorTable.color3ubArray();
|
||||
cvf::Color3ubArray interpolatedWellColors = wellColors;
|
||||
if (wells.size() > 1)
|
||||
{
|
||||
interpolatedWellColors = caf::ColorTable::interpolateColorArray(wellColors, wells.size());
|
||||
}
|
||||
|
||||
for (size_t wIdx = 0; wIdx < wells.size(); ++wIdx)
|
||||
{
|
||||
RimEclipseWell* well = wells[wIdx];
|
||||
if (well)
|
||||
{
|
||||
cvf::Color3f col = cvf::Color3f(interpolatedCatColors[wIdx]);
|
||||
cvf::Color3f col = cvf::Color3f(interpolatedWellColors[wIdx]);
|
||||
|
||||
well->wellPipeColor = col;
|
||||
well->updateConnectedEditors();
|
||||
|
Loading…
Reference in New Issue
Block a user