mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-27 12:35:46 +00:00
emit data changed signal when adding and removing the nested row
This commit is contained in:
parent
d221486a14
commit
72392ad68c
@ -155,6 +155,9 @@ bool CSMWorld::IdTable::removeRows (int row, int count, const QModelIndex& paren
|
|||||||
|
|
||||||
endRemoveRows();
|
endRemoveRows();
|
||||||
|
|
||||||
|
emit dataChanged (CSMWorld::IdTable::index (parent.row(), 0),
|
||||||
|
CSMWorld::IdTable::index (parent.row(), mIdCollection->getColumns()-1));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,10 +170,10 @@ void CSMWorld::IdTable::addNestedRow(const QModelIndex& parent, int position)
|
|||||||
beginInsertRows(parent, position, position);
|
beginInsertRows(parent, position, position);
|
||||||
mIdCollection->addNestedRow(row, parent.column(), position);
|
mIdCollection->addNestedRow(row, parent.column(), position);
|
||||||
|
|
||||||
|
endInsertRows();
|
||||||
|
|
||||||
emit dataChanged (CSMWorld::IdTable::index (row, 0),
|
emit dataChanged (CSMWorld::IdTable::index (row, 0),
|
||||||
CSMWorld::IdTable::index (row, mIdCollection->getColumns()-1));
|
CSMWorld::IdTable::index (row, mIdCollection->getColumns()-1));
|
||||||
|
|
||||||
endInsertRows();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QModelIndex CSMWorld::IdTable::index (int row, int column, const QModelIndex& parent) const
|
QModelIndex CSMWorld::IdTable::index (int row, int column, const QModelIndex& parent) const
|
||||||
|
Loading…
x
Reference in New Issue
Block a user