mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-15 15:30:56 -04: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
@ -108,7 +108,11 @@ void CSVWorld::CommandDelegate::setModelDataImp (QWidget *editor, QAbstractItemM
|
|||||||
{
|
{
|
||||||
NastyTableModelHack hack (*model);
|
NastyTableModelHack hack (*model);
|
||||||
QStyledItemDelegate::setModelData (editor, &hack, index);
|
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)
|
CSVWorld::CommandDelegate::CommandDelegate (QUndoStack& undoStack, QObject *parent)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user