diff options
| author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2005-08-02 16:17:50 +0100 |
|---|---|---|
| committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2005-08-02 16:17:50 +0100 |
| commit | 63148523ee70d96520a1ed4c574d760e072310ec (patch) | |
| tree | 2e30fb61f732a3492d4bb74d01af345d3054a039 /src/Panorama.cxx | |
| parent | 2d2a512cbf1a2ffa2c90ad664585b45503da5613 (diff) | |
remove old trackpoints before adding new gps track
Diffstat (limited to 'src/Panorama.cxx')
| -rw-r--r-- | src/Panorama.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Panorama.cxx b/src/Panorama.cxx index 90e1208..74595f7 100644 --- a/src/Panorama.cxx +++ b/src/Panorama.cxx @@ -92,6 +92,23 @@ Panorama::add_hills(Hills *h) { update_angles(); } +void +Panorama::remove_trackpoints() { + Hills *h_new = new Hills(); + Hill *m; + + for(int i=0; i<mountains->get_num(); i++) { + m = mountains->get(i); + if (! (m->flags & HILL_TRACK_POINT)) { + h_new->add(m); + } + } + + delete mountains; + mountains = h_new; +} + + int Panorama::set_viewpoint(const char *name) { if (get_pos(name, &view_phi, &view_lam, &view_height) != 1) { |
