mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
[Fwk] Fix for missing use of command framework for tree view model
This commit is contained in:
parent
390b04be3b
commit
5296add1cb
@ -241,7 +241,7 @@ public:
|
||||
CAF_PDM_InitField(&m_doubleField, "BigNumber", 0.0, "Big Number", "", "Enter a big number here", "This is a place you can enter a big real value if you want");
|
||||
CAF_PDM_InitField(&m_intField, "IntNumber", 0, "Small Number", "", "Enter some small number here", "This is a place you can enter a small integer value if you want" );
|
||||
CAF_PDM_InitField(&m_boolField, "BooleanValue", false, "Boolean:" , "", "Boolean:Enter some small number here", "Boolean:This is a place you can enter a small integer value if you want");
|
||||
CAF_PDM_InitField(&m_textField, "TextField", QString("Demo Object Description Field"), "", "", "", "");
|
||||
CAF_PDM_InitField(&m_textField, "TextField", QString("Demo Object Description Field"), "Description Field", "", "", "");
|
||||
CAF_PDM_InitField(&m_filePath, "FilePath", QString(""), "Filename", "", "", "");
|
||||
CAF_PDM_InitField(&m_longText, "LongText", QString("Test text"), "Long Text", "", "", "");
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
||||
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmUiCommandSystemProxy.h"
|
||||
#include "cafPdmUiDragDropInterface.h"
|
||||
#include "cafPdmUiTreeItemEditor.h"
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
@ -684,7 +685,7 @@ bool PdmUiTreeViewModel::setData(const QModelIndex &index, const QVariant &value
|
||||
PdmUiFieldHandle* userDescriptionUiField = uiObject->userDescriptionField()->uiCapability();
|
||||
if (userDescriptionUiField)
|
||||
{
|
||||
userDescriptionUiField->setValueFromUi(value);
|
||||
PdmUiCommandSystemProxy::instance()->setUiValueToField(userDescriptionUiField, value);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -698,7 +699,7 @@ bool PdmUiTreeViewModel::setData(const QModelIndex &index, const QVariant &value
|
||||
PdmUiFieldHandle* toggleUiField = uiObject->objectToggleField()->uiCapability();
|
||||
if (toggleUiField)
|
||||
{
|
||||
toggleUiField->setValueFromUi(value);
|
||||
PdmUiCommandSystemProxy::instance()->setUiValueToField(toggleUiField, toggleOn);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user