summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2008-01-15 00:07:35 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2008-01-15 00:07:35 +0000
commit679e7fcffa01c2bb8d3a1e3a50d8a7f838976f99 (patch)
tree8a3c2ada03ab2d8cc65624cc17635ebc663abd88 /gtk2_ardour/editor_ops.cc
parentcc607b9fb9d0f14ec2fe00366da3c7574874d06f (diff)
fix copy-drag SNAFU; fix shuffling playhead when zoom gets so low that rounding errors cause an iterative convergence on the "true" position if zoom-focus = playhead
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2914 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 58c88ab3c6..46a2ac53d0 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -1520,6 +1520,12 @@ Editor::temporal_zoom (gdouble fpu)
double nfpu;
double l;
+ /* XXX this limit is also in ::set_frames_per_unit() */
+
+ if (frames_per_unit <= 2.0 && fpu <= frames_per_unit) {
+ return;
+ }
+
nfpu = fpu;
new_page_size = (nframes_t) floor (canvas_width * nfpu);
@@ -1554,7 +1560,7 @@ Editor::temporal_zoom (gdouble fpu)
where = playhead_cursor->current_frame;
l = - ((new_page_size * ((where - current_leftmost)/(double)current_page)) - where);
-
+
if (l < 0) {
leftmost_after_zoom = 0;
} else if (l > max_frames) {