diff options
| author | Johannes Hofmann <johannes.hofmann@gmx.de> | 2005-05-17 07:20:38 +0000 |
|---|---|---|
| committer | Johannes Hofmann <johannes.hofmann@gmx.de> | 2005-05-17 07:20:38 +0000 |
| commit | 1cca92c3c8e00147917b6b6749d4e541cdc3174f (patch) | |
| tree | 9f114c11a54cdcc0b933e228600d8f5423163a58 /src/GipfelWidget.cxx | |
| parent | e06ffa5a533ca0c72b286c11b2cf8d5dfcad49e8 (diff) | |
use Value_ widgets
use Value_ widgets
Diffstat (limited to 'src/GipfelWidget.cxx')
| -rw-r--r-- | src/GipfelWidget.cxx | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx index b611bf0..c291685 100644 --- a/src/GipfelWidget.cxx +++ b/src/GipfelWidget.cxx @@ -1,5 +1,5 @@ // -// "$Id: GipfelWidget.cxx,v 1.30 2005/05/10 19:05:51 hofmann Exp $" +// "$Id: GipfelWidget.cxx,v 1.31 2005/05/17 09:20:38 hofmann Exp $" // // GipfelWidget routines. // @@ -186,8 +186,12 @@ GipfelWidget::set_labels(Hills *v) { for (j=0; j<v->get_num() && j < i; j++) { n = v->get(j); - if (overlap(m->x, m->label_x, n->x, n->label_x) && - overlap(m->label_y - height, m->label_y, n->label_y - height, n->label_y)) { + // Check for overlapping labels and + // overlaps between labels and peak markers + if ((overlap(m->x, m->label_x, n->x, n->label_x) && + overlap(m->label_y - height, m->label_y, n->label_y - height, n->label_y)) || + (overlap(m->x, m->label_x, n->x - 2, n->x + 2) && + overlap(m->label_y - height, m->label_y, n->y - 2, n->y + 2))) { m->label_y = n->label_y - height - 1; } } |
