Back to real-time zoom.
authorCarl Hetherington <carl@carlh.net>
Fri, 18 Jun 2010 02:07:13 +0000 (02:07 +0000)
committerCarl Hetherington <carl@carlh.net>
Fri, 18 Jun 2010 02:07:13 +0000 (02:07 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7278 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_summary.cc
gtk2_ardour/editor_summary.h

index efee5efd8d05e2d8db2dbbeb1e3a616f049ba56f..3e29520641720f15a0ba195db77016bba85ae533 100644 (file)
@@ -95,13 +95,7 @@ EditorSummary::on_expose_event (GdkEventExpose* event)
        */
 
        if (_editor->pending_visual_change.idle_handler_id < 0) {
-                  
-                  if (_zoom_dragging) {
-                          _view_rectangle_x = _pending_zoom_x;
-                          _view_rectangle_y = _pending_zoom_y;
-                  } else {
-                          get_editor (&_view_rectangle_x, &_view_rectangle_y);
-                  }
+               get_editor (&_view_rectangle_x, &_view_rectangle_y);
        }
 
        cairo_move_to (cr, _view_rectangle_x.first, _view_rectangle_y.first);
@@ -324,8 +318,6 @@ EditorSummary::on_button_press_event (GdkEventButton* ev)
                        _zoom_position = get_position (ev->x, ev->y);
                        _zoom_dragging = true;
                        _editor->_dragging_playhead = true;
-                       _pending_zoom_x = xr;
-                       _pending_zoom_y = yr;
 
                } else if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) {
 
@@ -484,19 +476,20 @@ EditorSummary::on_motion_notify_event (GdkEventMotion* ev)
                double const dy = ev->y - _start_mouse_y;
 
                if (_zoom_position == LEFT || _zoom_position == LEFT_TOP || _zoom_position == LEFT_BOTTOM) {
-                       _pending_zoom_x.first = _start_editor_x.first + dx;
+                       xr.first += dx;
                } else if (_zoom_position == RIGHT || _zoom_position == RIGHT_TOP || _zoom_position == RIGHT_BOTTOM) {
-                       _pending_zoom_x.second = _start_editor_x.second + dx;
+                       xr.second += dx;
                }
 
                if (_zoom_position == TOP || _zoom_position == LEFT_TOP || _zoom_position == RIGHT_TOP) {
-                       _pending_zoom_y.first = _start_editor_y.first + dy;
+                       yr.first += dy;
                } else if (_zoom_position == BOTTOM || _zoom_position == LEFT_BOTTOM || _zoom_position == RIGHT_BOTTOM) {
-                       _pending_zoom_y.second = _start_editor_y.second + dy;
+                       yr.second += dy;
                }
 
                set_overlays_dirty ();
                set_cursor (_zoom_position);
+               set_editor (xr, yr);
 
        } else {
 
@@ -510,10 +503,6 @@ EditorSummary::on_motion_notify_event (GdkEventMotion* ev)
 bool
 EditorSummary::on_button_release_event (GdkEventButton*)
 {
-       if (_zoom_dragging) {
-               set_editor (_pending_zoom_x, _pending_zoom_y);
-       }
-       
        _move_dragging = false;
        _zoom_dragging = false;
        _editor->_dragging_playhead = false;
index 283cd63c02f0021046439be306940c14a4efbdb2..2080692a858a62db7f7993e094992f9e035fb224 100644 (file)
@@ -104,8 +104,6 @@ private:
 
        bool _zoom_dragging;
        Position _zoom_position;
-       std::pair<double, double> _pending_zoom_x;
-       std::pair<double, double> _pending_zoom_y;
 
        PBD::ScopedConnectionList position_connection;
        PBD::ScopedConnectionList region_property_connection;