summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_summary.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-01-16 19:33:16 +0000
committerCarl Hetherington <carl@carlh.net>2011-01-16 19:33:16 +0000
commitad314252f4b578d268ed21d90969fc0a7102f4bb (patch)
treeea6b9c8d9693e78e568248494ed8d9a72092396b /gtk2_ardour/editor_summary.cc
parentb6b0bce678f4cfe392cf3fe98cadf3168a6be7ea (diff)
Disable follow playhead during editor summary drags.
git-svn-id: svn://localhost/ardour2/branches/3.0@8518 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_summary.cc')
-rw-r--r--gtk2_ardour/editor_summary.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/gtk2_ardour/editor_summary.cc b/gtk2_ardour/editor_summary.cc
index e279da94d3..65395274ef 100644
--- a/gtk2_ardour/editor_summary.cc
+++ b/gtk2_ardour/editor_summary.cc
@@ -50,7 +50,8 @@ EditorSummary::EditorSummary (Editor* e)
_moved (false),
_view_rectangle_x (0, 0),
_view_rectangle_y (0, 0),
- _zoom_dragging (false)
+ _zoom_dragging (false),
+ _old_follow_playhead (false)
{
Region::RegionPropertyChanged.connect (region_property_connection, invalidator (*this), boost::bind (&CairoWidget::set_dirty, this), gui_context());
_editor->playhead_cursor->PositionChanged.connect (position_connection, invalidator (*this), ui_bind (&EditorSummary::playhead_position_changed, this, _1), gui_context());
@@ -322,6 +323,8 @@ EditorSummary::on_button_press_event (GdkEventButton* ev)
_zoom_position = get_position (ev->x, ev->y);
_zoom_dragging = true;
_editor->_dragging_playhead = true;
+ _old_follow_playhead = _editor->follow_playhead ();
+ _editor->set_follow_playhead (false);
} else if (Keyboard::modifier_state_equals (ev->state, Keyboard::SecondaryModifier)) {
@@ -341,6 +344,8 @@ EditorSummary::on_button_press_event (GdkEventButton* ev)
_move_dragging = true;
_moved = false;
_editor->_dragging_playhead = true;
+ _old_follow_playhead = _editor->follow_playhead ();
+ _editor->set_follow_playhead (false);
}
}
@@ -523,6 +528,8 @@ EditorSummary::on_button_release_event (GdkEventButton*)
_move_dragging = false;
_zoom_dragging = false;
_editor->_dragging_playhead = false;
+ _editor->set_follow_playhead (_old_follow_playhead);
+
return true;
}