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:
parent
b68dbdd009
commit
00076a2695
@ -228,7 +228,7 @@ void ModelMoveCommand::doCommand()
|
|||||||
if (srcParent == destParent)
|
if (srcParent == destParent)
|
||||||
d = m_destRow - (m_endRow - m_startRow + 1);
|
d = m_destRow - (m_endRow - m_startRow + 1);
|
||||||
else
|
else
|
||||||
d = m_destRow - (m_endRow - m_startRow) + 1;
|
d = m_destRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (const qint64 id, l)
|
foreach (const qint64 id, l)
|
||||||
|
Loading…
Reference in New Issue
Block a user