Revert "#4308 System : Add virtual function childFieldChangedByUi"

This reverts commit fbf9308e2b.
This commit is contained in:
Magne Sjaastad 2019-04-10 10:57:18 +02:00
parent 66e09e4688
commit 91022a7535
2 changed files with 4 additions and 23 deletions

View File

@ -58,27 +58,11 @@ void PdmUiFieldHandle::notifyFieldChanged(const QVariant& oldFieldValue, const Q
PdmFieldHandle* fieldHandle = this->fieldHandle(); PdmFieldHandle* fieldHandle = this->fieldHandle();
CAF_ASSERT(fieldHandle && fieldHandle->ownerObject()); CAF_ASSERT(fieldHandle && fieldHandle->ownerObject());
PdmObjectHandle* ownerObjectHandle = fieldHandle->ownerObject(); PdmUiObjectHandle* uiObjHandle = uiObj(fieldHandle->ownerObject());
if (uiObjHandle)
{ {
PdmUiObjectHandle* uiObjHandle = uiObj(ownerObjectHandle); uiObjHandle->fieldChangedByUi(fieldHandle, oldFieldValue, newFieldValue);
if (uiObjHandle) uiObjHandle->updateConnectedEditors();
{
uiObjHandle->fieldChangedByUi(fieldHandle, oldFieldValue, newFieldValue);
uiObjHandle->updateConnectedEditors();
}
}
if (ownerObjectHandle->parentField() && ownerObjectHandle->parentField()->ownerObject())
{
PdmUiObjectHandle* uiObjHandle = uiObj(ownerObjectHandle->parentField()->ownerObject());
if (uiObjHandle)
{
uiObjHandle->childFieldChangedByUi(ownerObjectHandle->parentField());
// If updateConnectedEditors() is required, this has to be called in childFieldChangedByUi()
}
} }
// Update field editors // Update field editors

View File

@ -58,9 +58,6 @@ public: // Virtual
/// Method to reimplement to catch when the field has changed due to setUiValue() /// Method to reimplement to catch when the field has changed due to setUiValue()
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) {} virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue) {}
/// Method to reimplement to catch when a field in a contained object has changed due to setUiValue()
virtual void childFieldChangedByUi(const caf::PdmFieldHandle* changedChildField) {}
/// Method to re-implement to supply option values for a specific field /// Method to re-implement to supply option values for a specific field
virtual QList<caf::PdmOptionItemInfo> virtual QList<caf::PdmOptionItemInfo>
calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) { return QList<PdmOptionItemInfo>(); } calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly) { return QList<PdmOptionItemInfo>(); }