mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-19 16:21:08 +00:00
Fix enum delegate from adding a command to the undo stack when the value has not changed.
This commit is contained in:
parent
d6c2cff381
commit
0aff188d8d
@ -21,6 +21,8 @@ void CSVWorld::EnumDelegate::setModelDataImp (QWidget *editor, QAbstractItemMode
|
|||||||
iter!=mValues.end(); ++iter)
|
iter!=mValues.end(); ++iter)
|
||||||
if (iter->second==value)
|
if (iter->second==value)
|
||||||
{
|
{
|
||||||
|
// do nothing if the value has not changed
|
||||||
|
if (model->data(index).toInt() != iter->first)
|
||||||
addCommands (model, index, iter->first);
|
addCommands (model, index, iter->first);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user