mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
subsurfacewebservices: abstract between GlobeGPS and MapWidget
Call same methods from the two classes based on NO_MARBLE. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
8f52b129af
commit
b89ecd5ab8
1 changed files with 7 additions and 3 deletions
|
@ -6,6 +6,7 @@
|
|||
#include "desktop-widgets/usersurvey.h"
|
||||
#include "core/divelist.h"
|
||||
#include "desktop-widgets/globe.h"
|
||||
#include "desktop-widgets/mapwidget.h"
|
||||
#include "desktop-widgets/tab-widgets/maintab.h"
|
||||
#include "core/display.h"
|
||||
#include "core/membuffer.h"
|
||||
|
@ -478,14 +479,17 @@ void SubsurfaceWebServices::buttonClicked(QAbstractButton *button)
|
|||
i--; // otherwise we skip one site
|
||||
}
|
||||
}
|
||||
#ifndef NO_MARBLE
|
||||
// finally now that all the extra GPS fixes that weren't used have been deleted
|
||||
// we can update the globe
|
||||
// we can update the map
|
||||
if (changed) {
|
||||
#ifndef NO_MARBLE
|
||||
GlobeGPS::instance()->repopulateLabels();
|
||||
GlobeGPS::instance()->centerOnDiveSite(get_dive_site_by_uuid(current_dive->dive_site_uuid));
|
||||
}
|
||||
#else
|
||||
MapWidget::instance()->repopulateLabels();
|
||||
MapWidget::instance()->centerOnDiveSite(get_dive_site_by_uuid(current_dive->dive_site_uuid));
|
||||
#endif
|
||||
}
|
||||
|
||||
} break;
|
||||
case QDialogButtonBox::RejectRole:
|
||||
|
|
Loading…
Add table
Reference in a new issue