1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-06 00:55:50 +00:00

Reverse action order for redo and undo

This commit is contained in:
unelsson 2021-08-21 14:14:00 +03:00
parent 0cfabd6f3b
commit 890ce1eefb

View File

@ -498,8 +498,8 @@ CSMWorld::DeleteNestedCommand::DeleteNestedCommand (IdTree& model,
void CSMWorld::DeleteNestedCommand::redo()
{
QModelIndex parentIndex = mModel.getModelIndex(mId, mParentColumn);
mModel.removeRows (mNestedRow, 1, parentIndex);
mModifyParentCommand->redo();
mModel.removeRows (mNestedRow, 1, parentIndex);
}
@ -529,8 +529,8 @@ CSMWorld::AddNestedCommand::AddNestedCommand(IdTree& model, const std::string& i
void CSMWorld::AddNestedCommand::redo()
{
QModelIndex parentIndex = mModel.getModelIndex(mId, mParentColumn);
mModel.addNestedRow (parentIndex, mNewRow);
mModifyParentCommand->redo();
mModel.addNestedRow (parentIndex, mNewRow);
}
void CSMWorld::AddNestedCommand::undo()