Got rid of the "ownership"-changes in EclipseResultDefinition with friends.

Updating is now done more explicitly.
This commit is contained in:
Jacob Støren
2015-08-10 14:14:22 +02:00
parent 8ee3e12335
commit df0b4164c5
5 changed files with 39 additions and 50 deletions

View File

@@ -47,20 +47,7 @@ RimEclipseFaultColors::RimEclipseFaultColors()
CAF_PDM_InitFieldNoDefault(&m_customFaultResultColors, "CustomResultSlot", "Custom Fault Result", ":/CellResult.png", "", "");
m_customFaultResultColors = new RimEclipseCellColors();
// MODTODO how to handle this?
//m_customFaultResultColors.setOwnerObject(this);
m_customFaultResultColors.uiCapability()->setUiHidden(true);
m_customFaultResultColors()->setUiHidden(true);
// MODTODO how to handle this?
/*
// Take ownership of the fields in RimResultDefinition to be able to trap fieldChangedByUi in this class
m_customFaultResultColors->m_resultTypeUiField.setOwnerObject(this);
m_customFaultResultColors->m_porosityModelUiField.setOwnerObject(this);
m_customFaultResultColors->m_resultVariableUiField.setOwnerObject(this);
*/
updateFieldVisibility();
}
@@ -88,13 +75,6 @@ void RimEclipseFaultColors::fieldChangedByUi(const caf::PdmFieldHandle* changedF
{
this->updateUiIconFromToggleField();
m_customFaultResultColors->fieldChangedByUi(changedField, oldValue, newValue);
if (changedField == &m_customFaultResultColors->m_resultVariableUiField)
{
RiuMainWindow::instance()->uiPdmModel()->updateUiSubTree(this);
}
if (m_reservoirView) m_reservoirView->scheduleCreateDisplayModelAndRedraw();
}