1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-29 22:15:32 +00:00

Fix enum delegate from adding a command to the undo stack when the value has not changed.

This commit is contained in:
cc9cii 2015-04-18 07:13:02 +10:00
parent d6c2cff381
commit 0aff188d8d

View file

@ -21,7 +21,9 @@ void CSVWorld::EnumDelegate::setModelDataImp (QWidget *editor, QAbstractItemMode
iter!=mValues.end(); ++iter)
if (iter->second==value)
{
addCommands (model, index, iter->first);
// do nothing if the value has not changed
if (model->data(index).toInt() != iter->first)
addCommands (model, index, iter->first);
break;
}
}