diff --git a/ApplicationCode/Application/RiaApplication.cpp b/ApplicationCode/Application/RiaApplication.cpp index 565c427f8d..234f1b9b92 100644 --- a/ApplicationCode/Application/RiaApplication.cpp +++ b/ApplicationCode/Application/RiaApplication.cpp @@ -868,8 +868,6 @@ bool RiaApplication::openEclipseCase(const QString& caseName, const QString& cas riv->loadDataAndUpdate(); - riv->wellCollection()->assignDefaultWellColors(); - // Add a corresponding summary case if it exists { RimSummaryCaseCollection* sumCaseColl = m_project->activeOilField() ? m_project->activeOilField()->summaryCaseCollection() : NULL; diff --git a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp index b49239e2ac..ffb9c3310f 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseView.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseView.cpp @@ -1089,6 +1089,8 @@ void RimEclipseView::syncronizeWellsWithResults() well->setWellResults(NULL, -1); } + bool isAnyWellCreated = false; + // Find corresponding well from well result, or create a new for (size_t wIdx = 0; wIdx < wellResults.size(); ++wIdx) @@ -1099,6 +1101,8 @@ void RimEclipseView::syncronizeWellsWithResults() { well = new RimEclipseWell; well->name = wellResults[wIdx]->m_wellName; + + isAnyWellCreated = true; } newWells.push_back(well); @@ -1121,6 +1125,10 @@ void RimEclipseView::syncronizeWellsWithResults() // Set the new wells into the field. this->wellCollection()->wells().insert(0, newWells); + if (isAnyWellCreated) + { + this->wellCollection()->assignDefaultWellColors(); + } // Make sure all the wells have their reservoirView ptr setup correctly this->wellCollection()->setReservoirView(this);