summaryrefslogtreecommitdiff
path: root/gtk2_ardour/time_axis_view.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2010-03-16 15:33:04 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2010-03-16 15:33:04 +0000
commit6ef5d85ae1f2c500c4163cd1df580b3f26991c1e (patch)
tree15194a52bb72f036117fc4c87c193a4cbb64be8b /gtk2_ardour/time_axis_view.cc
parent830911f6f9451d83a58043b3f9084d3caa164b7b (diff)
changes from 2.X starting in march 2009 through oct 20 2009 (5826 inclusive)
git-svn-id: svn://localhost/ardour2/branches/3.0@6761 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/time_axis_view.cc')
-rw-r--r--gtk2_ardour/time_axis_view.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/gtk2_ardour/time_axis_view.cc b/gtk2_ardour/time_axis_view.cc
index 16485f0082..04018dee7c 100644
--- a/gtk2_ardour/time_axis_view.cc
+++ b/gtk2_ardour/time_axis_view.cc
@@ -153,6 +153,7 @@ TimeAxisView::TimeAxisView (ARDOUR::Session* sess, PublicEditor& ed, TimeAxisVie
resizer.signal_button_press_event().connect (sigc::mem_fun (*this, &TimeAxisView::resizer_button_press));
resizer.signal_button_release_event().connect (sigc::mem_fun (*this, &TimeAxisView::resizer_button_release));
resizer.signal_motion_notify_event().connect (sigc::mem_fun (*this, &TimeAxisView::resizer_motion));
+
resizer.set_events (Gdk::BUTTON_PRESS_MASK|
Gdk::BUTTON_RELEASE_MASK|
Gdk::POINTER_MOTION_MASK|
@@ -1307,13 +1308,11 @@ TimeAxisView::idle_resize (uint32_t h)
bool
TimeAxisView::resizer_motion (GdkEventMotion* ev)
{
- if (_resize_drag_start < 0) {
- return true;
- }
-
- int32_t const delta = (int32_t) floor (ev->y_root - _resize_drag_start);
- _editor.add_to_idle_resize (this, delta);
- _resize_drag_start = ev->y_root;
+ if (_resize_drag_start >= 0) {
+ int32_t const delta = (int32_t) floor (ev->y_root - _resize_drag_start);
+ _editor.add_to_idle_resize (this, delta);
+ _resize_drag_start = ev->y_root;
+ }
return true;
}