Open property editor on single click, fix for sub-value edits
This commit is contained in:
parent
f6f36f4f2e
commit
7a28db3d40
|
@ -451,8 +451,8 @@ void CPropertyDelegate::setModelData(QWidget *pEditor, QAbstractItemModel* /*pMo
|
||||||
{
|
{
|
||||||
pProp = mpModel->PropertyForIndex(rkIndex, true);
|
pProp = mpModel->PropertyForIndex(rkIndex, true);
|
||||||
|
|
||||||
IPropertyValue *pOldValue = pProp->RawValue();
|
IPropertyValue *pRawValue = pProp->RawValue();
|
||||||
pOldValue = pOldValue ? pOldValue->Clone() : nullptr;
|
pOldValue = pRawValue ? pRawValue->Clone() : nullptr;
|
||||||
|
|
||||||
if (pProp->Type() == eCharacterProperty)
|
if (pProp->Type() == eCharacterProperty)
|
||||||
SetCharacterModelData(pEditor, rkIndex);
|
SetCharacterModelData(pEditor, rkIndex);
|
||||||
|
|
|
@ -15,6 +15,7 @@ CPropertyView::CPropertyView(QWidget *pParent)
|
||||||
setModel(mpModel);
|
setModel(mpModel);
|
||||||
|
|
||||||
connect(this, SIGNAL(expanded(QModelIndex)), this, SLOT(SetPersistentEditors(QModelIndex)));
|
connect(this, SIGNAL(expanded(QModelIndex)), this, SLOT(SetPersistentEditors(QModelIndex)));
|
||||||
|
connect(this, SIGNAL(clicked(QModelIndex)), this, SLOT(edit(QModelIndex)));
|
||||||
connect(mpModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(SetPersistentEditors(QModelIndex)));
|
connect(mpModel, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(SetPersistentEditors(QModelIndex)));
|
||||||
connect(mpModel, SIGNAL(PropertyModified(QModelIndex)), this, SLOT(OnPropertyModified(QModelIndex)));
|
connect(mpModel, SIGNAL(PropertyModified(QModelIndex)), this, SLOT(OnPropertyModified(QModelIndex)));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue