diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-05-05 10:37:02 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-05-07 08:43:27 -0700 |
commit | 1cd9229ae0e01c2e3d7fd81faa566b3a8e02e09e (patch) | |
tree | 3751d8adb01d293fd7e4ab5c22e94aa7a0a88251 | |
parent | fb6210a99a1eda0f7f7197ed57f3c61a82132dff (diff) | |
download | subsurface-1cd9229ae0e01c2e3d7fd81faa566b3a8e02e09e.tar.gz |
desktop: don't update models in MainWindow::refreshDisplay()
The models should now properly reset themselves if data in
the core changes.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 6 | ||||
-rw-r--r-- | desktop-widgets/mainwindow.h | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index f4eadab16..7888a1d48 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -405,11 +405,9 @@ MainWindow *MainWindow::instance() } // This gets called after one or more dives were added, edited or downloaded for a dive computer -void MainWindow::refreshDisplay(bool doRecreateDiveList) +void MainWindow::refreshDisplay() { mainTab->reload(); - if (doRecreateDiveList) - diveList->reload(); setApplicationState(ApplicationState::Default); diveList->setEnabled(true); @@ -782,7 +780,7 @@ void MainWindow::planCanceled() // while planning we might have modified the displayed_dive // let's refresh what's shown on the profile refreshProfile(); - refreshDisplay(false); + refreshDisplay(); } void MainWindow::planCreated() diff --git a/desktop-widgets/mainwindow.h b/desktop-widgets/mainwindow.h index 683897cd7..ccf6baf22 100644 --- a/desktop-widgets/mainwindow.h +++ b/desktop-widgets/mainwindow.h @@ -158,7 +158,7 @@ public slots: void turnOffNdlTts(); void readSettings(); - void refreshDisplay(bool doRecreateDiveList = true); + void refreshDisplay(); void showProfile(); void refreshProfile(); void editCurrentDive(); |