mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-13 20:39:40 +00:00
Small cleanup
This commit is contained in:
parent
fcd082c6a5
commit
c50cecdc64
3 changed files with 5 additions and 10 deletions
|
@ -127,12 +127,10 @@ bool CSMWorld::IdTable::removeRows (int row, int count, const QModelIndex& paren
|
|||
{
|
||||
if (parent.isValid())
|
||||
{
|
||||
beginRemoveRows(parent, row, row+count-1);
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
mIdCollection->removeNestedRows(parent.row(), parent.column(), row+i);
|
||||
}
|
||||
endRemoveRows();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -149,7 +147,11 @@ void CSMWorld::IdTable::addNestedRow(const QModelIndex& parent, int position)
|
|||
{
|
||||
assert(parent.isValid());
|
||||
|
||||
mIdCollection->addNestedRow(parent.row(), parent.column(), position);
|
||||
int row = parent.row();
|
||||
mIdCollection->addNestedRow(row, parent.column(), position);
|
||||
|
||||
emit dataChanged (CSMWorld::IdTable::index (row, 0),
|
||||
CSMWorld::IdTable::index (row, mIdCollection->getColumns()-1));
|
||||
}
|
||||
|
||||
QModelIndex CSMWorld::IdTable::index (int row, int column, const QModelIndex& parent) const
|
||||
|
|
|
@ -77,7 +77,6 @@ void CSVWorld::NestedTable::removeRowActionTriggered()
|
|||
mModel->getParentId(),
|
||||
selectionModel()->selectedRows().begin()->row(),
|
||||
mModel->getParentColumn()));
|
||||
|
||||
}
|
||||
|
||||
void CSVWorld::NestedTable::addNewRowActionTriggered()
|
||||
|
@ -86,5 +85,4 @@ void CSVWorld::NestedTable::addNewRowActionTriggered()
|
|||
mModel->getParentId(),
|
||||
selectionModel()->selectedRows().size(),
|
||||
mModel->getParentColumn()));
|
||||
|
||||
}
|
||||
|
|
|
@ -47,11 +47,6 @@ namespace CSVWorld
|
|||
void removeRowActionTriggered();
|
||||
|
||||
void addNewRowActionTriggered();
|
||||
|
||||
signals:
|
||||
void addNewRow();
|
||||
|
||||
void removeRow(int row);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue