mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
636477becc
commit
f5b33dede3
1 changed files with 1 additions and 0 deletions
|
@ -655,6 +655,7 @@ void WSInfoModel::updateInfo()
|
||||||
struct ws_info_t *info = ws_info;
|
struct ws_info_t *info = ws_info;
|
||||||
beginRemoveRows(QModelIndex(), 0, this->rows);
|
beginRemoveRows(QModelIndex(), 0, this->rows);
|
||||||
endRemoveRows();
|
endRemoveRows();
|
||||||
|
rows = -1;
|
||||||
for (info = ws_info; info->name; info++, rows++){
|
for (info = ws_info; info->name; info++, rows++){
|
||||||
QString wsInfoName(info->name);
|
QString wsInfoName(info->name);
|
||||||
if( wsInfoName.count() > biggerEntry.count()){
|
if( wsInfoName.count() > biggerEntry.count()){
|
||||||
|
|
Loading…
Add table
Reference in a new issue