#3413 Well Path Import : Avoid similar default color

This commit is contained in:
Magne Sjaastad
2018-09-25 14:36:50 +02:00
parent 9958094983
commit b999a14aaf
3 changed files with 85 additions and 38 deletions

View File

@@ -255,15 +255,6 @@ void RimWellPathCollection::readAndAddWellPaths(std::vector<RimFileWellPath*>& w
{
caf::ProgressInfo progress(wellPathArray.size(), "Reading well paths from file");
const caf::ColorTable& colorTable = RiaColorTables::wellLogPlotPaletteColors();
cvf::Color3ubArray wellColors = colorTable.color3ubArray();
cvf::Color3ubArray interpolatedWellColors = wellColors;
if (wellPathArray.size() > 1)
{
interpolatedWellColors = caf::ColorTable::interpolateColorArray(wellColors, wellPathArray.size());
}
for (size_t wpIdx = 0; wpIdx < wellPathArray.size(); wpIdx++)
{
RimFileWellPath* wellPath = wellPathArray[wpIdx];
@@ -287,7 +278,7 @@ void RimWellPathCollection::readAndAddWellPaths(std::vector<RimFileWellPath*>& w
}
else
{
wellPath->setWellPathColor(cvf::Color3f(interpolatedWellColors[wpIdx]));
wellPath->setWellPathColor(RiaColorTables::wellPathsPaletteColors().cycledColor3f(wellPaths.size()));
wellPath->setUnitSystem(findUnitSystemForWellPath(wellPath));
m_mostRecentlyUpdatedWellPath = wellPath;
wellPaths.push_back(wellPath);