aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-04-27 16:53:13 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-29 13:06:39 -0700
commitcab0147093b829d971ca0a1ce92e9d881440311f (patch)
tree0157ddfb367fa6d8a29fdaf02f3c9a100d413a9a /desktop-widgets
parent36d8dcc3bf9b4d31d86d2b739196dd52ebf226f2 (diff)
downloadsubsurface-cab0147093b829d971ca0a1ce92e9d881440311f.tar.gz
Cleanup: implement proper Qt-model semantics in WeightInfoModel
- Use a beginResetModel()/endResetModel() pair instead of distinct addRows / removeRows pairs. - Reuse the update function in the constructor(). - Let "rows" be the number of rows, not the number of rows minus one. - Remove updateInfo() function as it does the same as update(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 0760e747d..9ff6808c5 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -425,7 +425,7 @@ void MainWindow::refreshDisplay(bool doRecreateDiveList)
setApplicationState("Default");
diveList->setEnabled(true);
diveList->setFocus();
- WSInfoModel::instance()->updateInfo();
+ WSInfoModel::instance()->update();
ui.actionAutoGroup->setChecked(autogroup);
}