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:
parent
d0ef95a1e1
commit
ded8862e9d
1 changed files with 6 additions and 1 deletions
|
@ -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()));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue