summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-10 14:55:30 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-09-10 14:55:30 -0700
commitf5b33dede359dccc31fafa72e0e2550868d8edd2 (patch)
tree635b3d4fb8823861c7e8006ed763069b039cfacf /qt-ui
parent636477becc3d8bea147382a7fec13d53c0e04433 (diff)
downloadsubsurface-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>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/models.cpp1
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()){