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>
This commit is contained in:
Dirk Hohndel 2013-09-10 14:55:30 -07:00
parent 636477becc
commit f5b33dede3

View file

@ -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()){