Remove code to zoom on up/down mouse movement when dragging
authorCarl Hetherington <carl@carlh.net>
Wed, 23 Nov 2011 01:17:41 +0000 (01:17 +0000)
committerCarl Hetherington <carl@carlh.net>
Wed, 23 Nov 2011 01:17:41 +0000 (01:17 +0000)
the playhead.

git-svn-id: svn://localhost/ardour2/branches/3.0@10786 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_drag.cc

index 435137168c7de2bed988be1c836f5c297c312caa..3eeca0a6bc892e3de869cb02f0e09efc19b6d954 100644 (file)
@@ -2094,39 +2094,6 @@ CursorDrag::start_grab (GdkEvent* event, Gdk::Cursor* c)
 void
 CursorDrag::motion (GdkEvent* event, bool)
 {
-       if (_drags->current_pointer_y() != last_pointer_y()) {
-
-               /* zoom when we move the pointer up and down */
-
-               /* y range to operate over (pixels) */
-               double const y_range = 512;
-               /* we will multiply the grab zoom by a factor between scale_range and scale_range^-1 */
-               double const scale_range = 4;
-               /* dead zone around the grab point in which to do no zooming (pixels) */
-               double const dead_zone = 100;
-
-               /* current dy */
-               double dy = _drags->current_pointer_y() - grab_y();
-
-               if (dy < -dead_zone || dy > dead_zone) {
-                       /* we are outside the dead zone; remove it from our calculation */
-                       if (dy < 0) {
-                               dy += dead_zone;
-                       } else {
-                               dy -= dead_zone;
-                       }
-
-                       /* get a number from -1 to 1 as dy ranges from -y_range to y_range */
-                       double udy = max (min (dy / y_range, 1.0), -1.0);
-
-                       /* and zoom, using playhead focus temporarily */
-                       Editing::ZoomFocus const zf = _editor->get_zoom_focus ();
-                       _editor->set_zoom_focus (Editing::ZoomFocusPlayhead);
-                       _editor->temporal_zoom (_grab_zoom * pow (scale_range, -udy));
-                       _editor->set_zoom_focus (zf);
-               }
-       }
-
        framepos_t const adjusted_frame = adjusted_current_frame (event);
        if (adjusted_frame != last_pointer_frame()) {
                fake_locate (adjusted_frame);