From f5b33dede359dccc31fafa72e0e2550868d8edd2 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Tue, 10 Sep 2013 14:55:30 -0700 Subject: 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 --- qt-ui/models.cpp | 1 + 1 file changed, 1 insertion(+) 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()){ -- cgit v1.2.3-70-g09d2