mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 21:49:55 +00:00
do not generate modfiy commands on edits to change a cell to a value equal its original value before the edit
This commit is contained in:
parent
30d5040f2f
commit
a7cece3d30
1 changed files with 5 additions and 1 deletions
|
@ -108,7 +108,11 @@ void CSVWorld::CommandDelegate::setModelDataImp (QWidget *editor, QAbstractItemM
|
|||
{
|
||||
NastyTableModelHack hack (*model);
|
||||
QStyledItemDelegate::setModelData (editor, &hack, index);
|
||||
mUndoStack.push (new CSMWorld::ModifyCommand (*model, index, hack.getData()));
|
||||
|
||||
QVariant new_ = hack.getData();
|
||||
|
||||
if (model->data (index)!=new_)
|
||||
mUndoStack.push (new CSMWorld::ModifyCommand (*model, index, new_));
|
||||
}
|
||||
|
||||
CSVWorld::CommandDelegate::CommandDelegate (QUndoStack& undoStack, QObject *parent)
|
||||
|
|
Loading…
Reference in a new issue