mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 07:16:53 -06:00
Generalized update
This commit is contained in:
parent
90b6dd44ee
commit
792793b6ed
@ -99,17 +99,11 @@ void CmdAddItemExec::redo()
|
||||
m_commandData->m_createdItemIndex = m_commandData->m_indexAfter;
|
||||
}
|
||||
|
||||
if (m_notificationCenter) m_notificationCenter->notifyObserversOfDataChange(obj);
|
||||
|
||||
listField->uiCapability()->updateConnectedEditors();
|
||||
|
||||
if (listField->ownerObject())
|
||||
{
|
||||
caf::PdmUiObjectHandle* ownerUiObject = uiObj(listField->ownerObject());
|
||||
if (ownerUiObject)
|
||||
{
|
||||
ownerUiObject->fieldChangedByUi(listField, QVariant(), QVariant());
|
||||
}
|
||||
listField->ownerObject()->uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -132,17 +126,12 @@ void CmdAddItemExec::undo()
|
||||
caf::SelectionManager::instance()->removeObjectFromAllSelections(obj);
|
||||
|
||||
listField->erase(m_commandData->m_createdItemIndex);
|
||||
listField->uiCapability()->updateConnectedEditors();
|
||||
|
||||
if (m_notificationCenter) m_notificationCenter->notifyObservers();
|
||||
listField->uiCapability()->updateConnectedEditors();
|
||||
|
||||
if (listField->ownerObject())
|
||||
{
|
||||
caf::PdmUiObjectHandle* ownerUiObject = uiObj(listField->ownerObject());
|
||||
if (ownerUiObject)
|
||||
{
|
||||
ownerUiObject->fieldChangedByUi(listField, QVariant(), QVariant());
|
||||
}
|
||||
listField->ownerObject()->uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
delete obj;
|
||||
|
Loading…
Reference in New Issue
Block a user