1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-31 22:15:33 +00:00

Insert nested rows after selected row, or at start if none selected.

This commit is contained in:
Aesylwinn 2016-05-26 22:44:02 -04:00
parent d0ef95a1e1
commit ded8862e9d

View file

@ -119,9 +119,14 @@ void CSVWorld::NestedTable::removeRowActionTriggered()
void CSVWorld::NestedTable::addNewRowActionTriggered()
{
int row = 0;
if (!selectionModel()->selectedRows().empty())
row = selectionModel()->selectedRows().back().row() + 1;
mDocument.getUndoStack().push(new CSMWorld::AddNestedCommand(*(mModel->model()),
mModel->getParentId(),
selectionModel()->selectedRows().size(),
row,
mModel->getParentColumn()));
}