From cab0147093b829d971ca0a1ce92e9d881440311f Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 27 Apr 2019 16:53:13 +0200 Subject: 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 --- desktop-widgets/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'desktop-widgets') 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); } -- cgit v1.2.3-70-g09d2