Added guarding of missing legendConfig

This commit is contained in:
Magne Sjaastad 2015-08-11 11:12:43 +02:00
parent c7fca88bdc
commit 421c2e3685
2 changed files with 5 additions and 1 deletions

View File

@ -89,6 +89,7 @@ void RimEclipseCellColors::fieldChangedByUi(const caf::PdmFieldHandle* changedFi
RimEclipseFaultColors* faultColors = dynamic_cast<RimEclipseFaultColors*>(this->parentField()->ownerObject());
if (faultColors)
{
faultColors->updateConnectedEditors();
RiuMainWindow::instance()->uiPdmModel()->updateUiSubTree(faultColors);
}
else

View File

@ -153,7 +153,10 @@ bool RimEclipseFaultColors::hasValidCustomResult()
//--------------------------------------------------------------------------------------------------
void RimEclipseFaultColors::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
{
if (m_customFaultResultColors()->legendConfig())
{
uiTreeOrdering.add(m_customFaultResultColors()->legendConfig());
}
uiTreeOrdering.setForgetRemainingFields(true);
}