From 72392ad68c025ea634fcfc2ec280e9611969e0b4 Mon Sep 17 00:00:00 2001 From: Marek Kochanowicz Date: Mon, 7 Jul 2014 12:22:04 +0200 Subject: [PATCH] emit data changed signal when adding and removing the nested row --- apps/opencs/model/world/idtable.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/opencs/model/world/idtable.cpp b/apps/opencs/model/world/idtable.cpp index c2eb32fa5..0b5f9c5a3 100644 --- a/apps/opencs/model/world/idtable.cpp +++ b/apps/opencs/model/world/idtable.cpp @@ -155,6 +155,9 @@ bool CSMWorld::IdTable::removeRows (int row, int count, const QModelIndex& paren endRemoveRows(); + emit dataChanged (CSMWorld::IdTable::index (parent.row(), 0), + CSMWorld::IdTable::index (parent.row(), mIdCollection->getColumns()-1)); + return true; } @@ -167,10 +170,10 @@ void CSMWorld::IdTable::addNestedRow(const QModelIndex& parent, int position) beginInsertRows(parent, position, position); mIdCollection->addNestedRow(row, parent.column(), position); + endInsertRows(); + emit dataChanged (CSMWorld::IdTable::index (row, 0), CSMWorld::IdTable::index (row, mIdCollection->getColumns()-1)); - - endInsertRows(); } QModelIndex CSMWorld::IdTable::index (int row, int column, const QModelIndex& parent) const