diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-01-04 17:23:51 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-01-04 17:23:51 +0000 |
commit | d41f7a0a701bb7af04ab4b3c2a26ff23f96407f9 (patch) | |
tree | 011fcafb38e617b16a3069dd8cbab5d816e0a6ca /gtk2_ardour/editor.cc | |
parent | f7a174a59b091ca545bffbd5b1d1bcaced95285f (diff) |
a few fixes for zoom, plus the results of unfinished work on zoom redrawing, plus cleanup of debugging code in DnDTreevew
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2827 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor.cc')
-rw-r--r-- | gtk2_ardour/editor.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/gtk2_ardour/editor.cc b/gtk2_ardour/editor.cc index c84c9bb909..8beb3d77bc 100644 --- a/gtk2_ardour/editor.cc +++ b/gtk2_ardour/editor.cc @@ -343,7 +343,7 @@ Editor::Editor () initialize_canvas (); edit_controls_vbox.set_spacing (0); - horizontal_adjustment.signal_value_changed().connect (mem_fun(*this, &Editor::canvas_horizontally_scrolled)); + horizontal_adjustment.signal_value_changed().connect (mem_fun(*this, &Editor::canvas_horizontally_scrolled), false); vertical_adjustment.signal_value_changed().connect (mem_fun(*this, &Editor::tie_vertical_scrolling), true); track_canvas.set_hadjustment (horizontal_adjustment); @@ -4046,7 +4046,7 @@ Editor::post_zoom () reset_hscrollbar_stepping (); reset_scrolling_region (); - + if (playhead_cursor) playhead_cursor->set_position (playhead_cursor->current_frame); instant_save (); @@ -4093,10 +4093,11 @@ Editor::idle_visual_changer () } if (p & VisualChange::TimeOrigin) { - double val = horizontal_adjustment.get_value(); - if ((nframes_t) floor (val * frames_per_unit) != pending_visual_change.time_origin) { + + nframes_t time_origin = (nframes_t) floor (horizontal_adjustment.get_value() * frames_per_unit); + + if (time_origin != pending_visual_change.time_origin) { horizontal_adjustment.set_value (pending_visual_change.time_origin/frames_per_unit); - /* the signal handler will do the rest */ } else { update_fixed_rulers(); redisplay_tempo (true); |