summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/GipfelWidget.cxx2
-rw-r--r--src/Hill.cxx14
2 files changed, 11 insertions, 5 deletions
diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx
index 9f9d10a..9cfbdb6 100644
--- a/src/GipfelWidget.cxx
+++ b/src/GipfelWidget.cxx
@@ -232,7 +232,7 @@ GipfelWidget::set_labels(Hills *v) {
for (j=0; j<v->get_num() && j < i; j++) {
n = v->get(j);
- if (n->flags & HILL_DUPLICATE) {
+ if (n->flags & (HILL_DUPLICATE | HILL_TRACK_POINT)) {
continue;
}
diff --git a/src/Hill.cxx b/src/Hill.cxx
index 35c7ada..9c9329b 100644
--- a/src/Hill.cxx
+++ b/src/Hill.cxx
@@ -125,14 +125,20 @@ void Hills::mark_duplicates(double dist) {
for(i=0; i<get_num();i++) {
m = get(i);
+ if (m->flags & HILL_TRACK_POINT) {
+ continue;
+ }
+
if (m) {
j = i + 1;
n = get(j);
while (n && fabs(n->phi - m->phi) <= dist) {
- if (fabs(n->lam - m->lam) <= dist &&
- fabs(n->height - m->height) <= 50.0 ) {
- n->flags |= HILL_DUPLICATE;
- }
+ if (! n->flags & HILL_DUPLICATE) {
+ if (fabs(n->lam - m->lam) <= dist &&
+ fabs(n->height - m->height) <= 50.0 ) {
+ n->flags |= HILL_DUPLICATE;
+ }
+ }
j = j + 1;
n = get(j);
}