mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-03 12:10:57 -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;
|
m_commandData->m_createdItemIndex = m_commandData->m_indexAfter;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_notificationCenter) m_notificationCenter->notifyObserversOfDataChange(obj);
|
|
||||||
|
|
||||||
listField->uiCapability()->updateConnectedEditors();
|
listField->uiCapability()->updateConnectedEditors();
|
||||||
|
|
||||||
if (listField->ownerObject())
|
if (listField->ownerObject())
|
||||||
{
|
{
|
||||||
caf::PdmUiObjectHandle* ownerUiObject = uiObj(listField->ownerObject());
|
listField->ownerObject()->uiCapability()->updateConnectedEditors();
|
||||||
if (ownerUiObject)
|
|
||||||
{
|
|
||||||
ownerUiObject->fieldChangedByUi(listField, QVariant(), QVariant());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -132,17 +126,12 @@ void CmdAddItemExec::undo()
|
|||||||
caf::SelectionManager::instance()->removeObjectFromAllSelections(obj);
|
caf::SelectionManager::instance()->removeObjectFromAllSelections(obj);
|
||||||
|
|
||||||
listField->erase(m_commandData->m_createdItemIndex);
|
listField->erase(m_commandData->m_createdItemIndex);
|
||||||
listField->uiCapability()->updateConnectedEditors();
|
|
||||||
|
|
||||||
if (m_notificationCenter) m_notificationCenter->notifyObservers();
|
listField->uiCapability()->updateConnectedEditors();
|
||||||
|
|
||||||
if (listField->ownerObject())
|
if (listField->ownerObject())
|
||||||
{
|
{
|
||||||
caf::PdmUiObjectHandle* ownerUiObject = uiObj(listField->ownerObject());
|
listField->ownerObject()->uiCapability()->updateConnectedEditors();
|
||||||
if (ownerUiObject)
|
|
||||||
{
|
|
||||||
ownerUiObject->fieldChangedByUi(listField, QVariant(), QVariant());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delete obj;
|
delete obj;
|
||||||
|
Loading…
Reference in New Issue
Block a user