mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-06-27 11:39:16 +02:00
Enable DEM elevation for all data types (waypoints, routes)
This commit is contained in:
@ -12,7 +12,7 @@
|
||||
#include "map/ellipsoid.h"
|
||||
#include "map/gcs.h"
|
||||
#include "map/pcs.h"
|
||||
#include "data/track.h"
|
||||
#include "data/dem.h"
|
||||
#include "opengl.h"
|
||||
#include "gui.h"
|
||||
#include "settings.h"
|
||||
@ -65,8 +65,7 @@ App::App(int &argc, char **argv) : QApplication(argc, argv)
|
||||
OPENGL_SET_SAMPLES(4);
|
||||
loadDatums();
|
||||
loadPCSs();
|
||||
|
||||
Track::setDEMDir(ProgramPaths::demDir());
|
||||
DEM::setDir(ProgramPaths::demDir());
|
||||
|
||||
_gui = new GUI();
|
||||
}
|
||||
|
@ -875,6 +875,11 @@ void GUI::openOptions()
|
||||
Track::action(options.option); \
|
||||
reload = true; \
|
||||
}
|
||||
#define SET_DATA_OPTION(option, action) \
|
||||
if (options.option != _options.option) { \
|
||||
Data::action(options.option); \
|
||||
reload = true; \
|
||||
}
|
||||
|
||||
Options options(_options);
|
||||
bool reload = false;
|
||||
@ -913,7 +918,7 @@ void GUI::openOptions()
|
||||
SET_TRACK_OPTION(pauseSpeed, setPauseSpeed);
|
||||
SET_TRACK_OPTION(pauseInterval, setPauseInterval);
|
||||
SET_TRACK_OPTION(useReportedSpeed, useReportedSpeed);
|
||||
SET_TRACK_OPTION(useDEMElevation, useDEMElevation);
|
||||
SET_DATA_OPTION(useDEMElevation, useDEMElevation);
|
||||
|
||||
if (options.poiRadius != _options.poiRadius)
|
||||
_poi->setRadius(options.poiRadius);
|
||||
@ -2077,7 +2082,7 @@ void GUI::readSettings()
|
||||
Track::setPauseSpeed(_options.pauseSpeed);
|
||||
Track::setPauseInterval(_options.pauseInterval);
|
||||
Track::useReportedSpeed(_options.useReportedSpeed);
|
||||
Track::useDEMElevation(_options.useDEMElevation);
|
||||
Data::useDEMElevation(_options.useDEMElevation);
|
||||
|
||||
_poi->setRadius(_options.poiRadius);
|
||||
|
||||
|
Reference in New Issue
Block a user