diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-09-10 14:55:30 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-09-10 14:55:30 -0700 |
commit | f5b33dede359dccc31fafa72e0e2550868d8edd2 (patch) | |
tree | 635b3d4fb8823861c7e8006ed763069b039cfacf | |
parent | 636477becc3d8bea147382a7fec13d53c0e04433 (diff) | |
download | subsurface-f5b33dede359dccc31fafa72e0e2550868d8edd2.tar.gz |
Fix row counting bug
When updating the weight system model we have to remove the old ones and
then correctly count the new ones.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/models.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 479f58582..fc91e0558 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -655,6 +655,7 @@ void WSInfoModel::updateInfo() struct ws_info_t *info = ws_info; beginRemoveRows(QModelIndex(), 0, this->rows); endRemoveRows(); + rows = -1; for (info = ws_info; info->name; info++, rows++){ QString wsInfoName(info->name); if( wsInfoName.count() > biggerEntry.count()){ |