From 421c2e36856f5a276171079c7861b6f30d5d3d24 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Tue, 11 Aug 2015 11:12:43 +0200 Subject: [PATCH] Added guarding of missing legendConfig --- ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp | 1 + ApplicationCode/ProjectDataModel/RimEclipseFaultColors.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp b/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp index 317b62eea3..b747e361bc 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseCellColors.cpp @@ -89,6 +89,7 @@ void RimEclipseCellColors::fieldChangedByUi(const caf::PdmFieldHandle* changedFi RimEclipseFaultColors* faultColors = dynamic_cast(this->parentField()->ownerObject()); if (faultColors) { + faultColors->updateConnectedEditors(); RiuMainWindow::instance()->uiPdmModel()->updateUiSubTree(faultColors); } else diff --git a/ApplicationCode/ProjectDataModel/RimEclipseFaultColors.cpp b/ApplicationCode/ProjectDataModel/RimEclipseFaultColors.cpp index 15521e386b..2dc8902a33 100644 --- a/ApplicationCode/ProjectDataModel/RimEclipseFaultColors.cpp +++ b/ApplicationCode/ProjectDataModel/RimEclipseFaultColors.cpp @@ -153,7 +153,10 @@ bool RimEclipseFaultColors::hasValidCustomResult() //-------------------------------------------------------------------------------------------------- void RimEclipseFaultColors::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/) { - uiTreeOrdering.add(m_customFaultResultColors()->legendConfig()); + if (m_customFaultResultColors()->legendConfig()) + { + uiTreeOrdering.add(m_customFaultResultColors()->legendConfig()); + } uiTreeOrdering.setForgetRemainingFields(true); }