diff options
author | Johannes Hofmann <johannes.hofmann@gmx.de> | 2005-06-19 14:54:02 +0000 |
---|---|---|
committer | Johannes Hofmann <johannes.hofmann@gmx.de> | 2005-06-19 14:54:02 +0000 |
commit | 1c92fda21514b790219dec9a2e5a85718cb83e73 (patch) | |
tree | 2ecff677606140a8332cc9d4f8487feb30d6780f /src/GipfelWidget.cxx | |
parent | fe61e9b1f5b135f30bd1bf22a2be77ee85573ff9 (diff) |
add duplicate removal
add duplicate removal
Diffstat (limited to 'src/GipfelWidget.cxx')
-rw-r--r-- | src/GipfelWidget.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx index 85669b1..5e1c3bf 100644 --- a/src/GipfelWidget.cxx +++ b/src/GipfelWidget.cxx @@ -1,5 +1,5 @@ // -// "$Id: GipfelWidget.cxx,v 1.32 2005/05/20 13:34:39 hofmann Exp $" +// "$Id: GipfelWidget.cxx,v 1.33 2005/06/19 16:54:02 hofmann Exp $" // // GipfelWidget routines. // @@ -133,6 +133,10 @@ GipfelWidget::draw() { for (i=0; i<mnts->get_num(); i++) { m = mnts->get(i); + if (m->duplicate) { + continue; + } + if (m == m1) { fl_color(FL_RED); draw_flag(center_x + m->x + x(), center_y + m->y + y(), "1"); @@ -179,6 +183,10 @@ GipfelWidget::set_labels(Hills *v) { for (i=0; i<v->get_num(); i++) { m = v->get(i); + if (m->duplicate) { + continue; + } + fl_measure(m->name, width, height); m->label_x = m->x + width; m->label_y = m->y; @@ -186,6 +194,10 @@ GipfelWidget::set_labels(Hills *v) { for (j=0; j<v->get_num() && j < i; j++) { n = v->get(j); + if (n->duplicate) { + continue; + } + // Check for overlapping labels and // overlaps between labels and peak markers if ((overlap(m->x, m->label_x, n->x, n->label_x) && |