Don't insert items into the wrong row

This happened to work by chance, as QList::insert() would
gracefully handle out of bounds insertions.

Change-Id: I7ee1e645ed9a538946a509957ce5155641ffea1d
Reviewed-by: David Faure <david.faure@kdab.com>
This commit is contained in:
Lars Knoll 2018-12-03 10:29:07 +01:00
parent b68dbdd009
commit 00076a2695

View File

@ -228,7 +228,7 @@ void ModelMoveCommand::doCommand()
if (srcParent == destParent)
d = m_destRow - (m_endRow - m_startRow + 1);
else
d = m_destRow - (m_endRow - m_startRow) + 1;
d = m_destRow;
}
foreach (const qint64 id, l)