mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-28 11:41:37 +00:00
Partially undo commit 71be4cdd20
so that moved references retain the original refnum. This is consistent with vanilla CS's behaviour.
This commit is contained in:
parent
b2bd97f283
commit
2eb210f31a
1 changed files with 1 additions and 10 deletions
|
@ -141,7 +141,6 @@ void CSMWorld::CommandDispatcher::executeModify (QAbstractItemModel *model, cons
|
|||
|
||||
std::unique_ptr<CSMWorld::UpdateCellCommand> modifyCell;
|
||||
|
||||
std::unique_ptr<CSMWorld::ModifyCommand> modifyDataRefNum;
|
||||
|
||||
int columnId = model->data (index, ColumnBase::Role_ColumnId).toInt();
|
||||
|
||||
|
@ -170,14 +169,8 @@ void CSMWorld::CommandDispatcher::executeModify (QAbstractItemModel *model, cons
|
|||
|
||||
if (cellId.find ('#')!=std::string::npos)
|
||||
{
|
||||
// Need to recalculate the cell and (if necessary) clear the instance's refNum
|
||||
// Need to recalculate the cell
|
||||
modifyCell.reset (new UpdateCellCommand (model2, row));
|
||||
|
||||
// Not sure which model this should be applied to
|
||||
int refNumColumn = model2.searchColumnIndex (Columns::ColumnId_RefNum);
|
||||
|
||||
if (refNumColumn!=-1)
|
||||
modifyDataRefNum.reset (new ModifyCommand(*model, model->index(row, refNumColumn), 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -191,8 +184,6 @@ void CSMWorld::CommandDispatcher::executeModify (QAbstractItemModel *model, cons
|
|||
CommandMacro macro (mDocument.getUndoStack());
|
||||
macro.push (modifyData.release());
|
||||
macro.push (modifyCell.release());
|
||||
if (modifyDataRefNum.get())
|
||||
macro.push (modifyDataRefNum.release());
|
||||
}
|
||||
else
|
||||
mDocument.getUndoStack().push (modifyData.release());
|
||||
|
|
Loading…
Reference in a new issue