summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-06-18 02:07:13 +0000
committerCarl Hetherington <carl@carlh.net>2010-06-18 02:07:13 +0000
commit5e12dc768dbf4c3dcacb03e2b5bda42ce824b2f1 (patch)
treedff3fcd369c23ba2ab3cef4c688805b356c2a02c /gtk2_ardour
parent9c4f5ac000ad91b55e4cf91317b7a89f6239870e (diff)
Back to real-time zoom.
git-svn-id: svn://localhost/ardour2/branches/3.0@7278 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_summary.cc23
-rw-r--r--gtk2_ardour/editor_summary.h2
2 files changed, 6 insertions, 19 deletions
diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc
index efee5efd8d..3e29520641 100644
--- a/gtk2_ardour/editor_summary.cc
+++ b/gtk2_ardour/editor_summary.cc
@@ -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;
diff --git a/gtk2_ardour/editor_summary.h b/gtk2_ardour/editor_summary.h
index 283cd63c02..2080692a85 100644
--- a/gtk2_ardour/editor_summary.h
+++ b/gtk2_ardour/editor_summary.h
@@ -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;