From fc1943e743aef85b907584ac6e38131dd40e36c6 Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Thu, 5 May 2005 15:00:38 +0000 Subject: move label when moving mountain move label when moving mountain --- src/GipfelWidget.cxx | 5 +++-- src/Panorama.cxx | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx index 2ee9457..7a6343d 100644 --- a/src/GipfelWidget.cxx +++ b/src/GipfelWidget.cxx @@ -1,5 +1,5 @@ // -// "$Id: GipfelWidget.cxx,v 1.21 2005/05/05 15:24:43 hofmann Exp $" +// "$Id: GipfelWidget.cxx,v 1.22 2005/05/05 17:00:38 hofmann Exp $" // // PSEditWidget routines. // @@ -225,7 +225,8 @@ GipfelWidget::set_mountain(int m_x, int m_y) { cur_mountain->x = m_x - center_x; cur_mountain->y = m_y - center_y; - + cur_mountain->label_y = cur_mountain->y; + redraw(); return 0; } diff --git a/src/Panorama.cxx b/src/Panorama.cxx index a24b625..cd1daaf 100644 --- a/src/Panorama.cxx +++ b/src/Panorama.cxx @@ -1,5 +1,5 @@ // -// "$Id: Panorama.cxx,v 1.29 2005/05/05 16:53:02 hofmann Exp $" +// "$Id: Panorama.cxx,v 1.30 2005/05/05 17:00:38 hofmann Exp $" // // Panorama routines. // @@ -294,6 +294,8 @@ Panorama::optimize(Mountain *m1, Mountain *m2) { a_center = a_center + 2.0 * pi_d; } + // atan(tan_dir_view) is not the only possible solution. + // Choose the one which is close to m1->alph. if (fabs(a_center - m1->alph) > pi_d/2.0) { a_center = a_center + pi_d; } -- cgit v1.2.3