diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-04-27 16:53:13 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-29 13:06:39 -0700 |
commit | cab0147093b829d971ca0a1ce92e9d881440311f (patch) | |
tree | 0157ddfb367fa6d8a29fdaf02f3c9a100d413a9a /desktop-widgets | |
parent | 36d8dcc3bf9b4d31d86d2b739196dd52ebf226f2 (diff) | |
download | subsurface-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.cpp | 2 |
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); } |