diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2017-07-15 22:58:16 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-07-28 07:31:11 -0700 |
commit | 39af5bb05ba551cc9591939e5d516932e9d8e250 (patch) | |
tree | 7b61ea229e85e2fe73a4ba2bf398256d1a780362 /desktop-widgets/mainwindow.cpp | |
parent | 86f4a26a8344b0d7585b58f24357e8f21748b34c (diff) | |
download | subsurface-39af5bb05ba551cc9591939e5d516932e9d8e250.tar.gz |
mapwidget: add an empty reload() method
Call same method in MainWindow if the NO_MARBLE macro is defined.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 68b619afa..5e3f6abe3 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -216,7 +216,11 @@ MainWindow::MainWindow() : QMainWindow(), diveListView->reload(DiveTripModel::TREE); diveListView->reloadHeaderActions(); diveListView->setFocus(); +#ifndef NO_MARBLE GlobeGPS::instance()->reload(); +#else + MapWidget::instance()->reload(); +#endif diveListView->expand(dive_list()->model()->index(0, 0)); diveListView->scrollTo(dive_list()->model()->index(0, 0), QAbstractItemView::PositionAtCenter); divePlannerWidget()->settingsChanged(); @@ -425,7 +429,11 @@ void MainWindow::refreshDisplay(bool doRecreateDiveList) getNotificationWidget()->showNotification(get_error_string(), KMessageWidget::Error); information()->reload(); TankInfoModel::instance()->update(); +#ifndef NO_MARBLE GlobeGPS::instance()->reload(); +#else + MapWidget::instance()->reload(); +#endif if (doRecreateDiveList) recreateDiveList(); @@ -496,7 +504,11 @@ void MainWindow::current_dive_changed(int divenr) graphics()->plotDive(); information()->updateDiveInfo(); configureToolbar(); +#ifndef NO_MARBLE GlobeGPS::instance()->reload(); +#else + MapWidget::instance()->reload(); +#endif } void MainWindow::on_actionNew_triggered() @@ -652,7 +664,11 @@ void MainWindow::cleanUpEmpty() information()->updateDiveInfo(true); graphics()->setEmptyState(); dive_list()->reload(DiveTripModel::TREE); +#ifndef NO_MARBLE GlobeGPS::instance()->reload(); +#else + MapWidget::instance()->reload(); +#endif if (!existing_filename) setTitle(MWTF_DEFAULT); disableShortcuts(); |