diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2012-11-06 19:30:36 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2012-11-06 19:30:36 +0000 |
commit | cb57b954809c5fd7db06f0bdf10e219355b05248 (patch) | |
tree | d61ee45dfdf48dd6c965ac816c61534f13831fae /gtk2_ardour | |
parent | 9943fffdf82c9eb7424836e65a37d9e2cc8fab33 (diff) |
fix click to start editing audio clocks that occurs right of the clock, which was previously a "dead zone". should fix part of #5160
git-svn-id: svn://localhost/ardour2/branches/3.0@13391 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/audio_clock.cc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/gtk2_ardour/audio_clock.cc b/gtk2_ardour/audio_clock.cc index 866fd353e4..5e3ff631f7 100644 --- a/gtk2_ardour/audio_clock.cc +++ b/gtk2_ardour/audio_clock.cc @@ -1534,17 +1534,19 @@ AudioClock::on_button_press_event (GdkEventButton *ev) y = ev->y - ((upper_height - layout_height)/2); x = ev->x - layout_x_offset; - if (_layout->xy_to_index (x * PANGO_SCALE, y * PANGO_SCALE, index, trailing)) { - drag_field = index_to_field (index); - dragging = true; - /* make absolutely sure that the pointer is grabbed */ - gdk_pointer_grab(ev->window,false , - GdkEventMask( Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK |Gdk::BUTTON_RELEASE_MASK), - NULL,NULL,ev->time); - drag_accum = 0; - drag_start_y = ev->y; - drag_y = ev->y; + if (!_layout->xy_to_index (x * PANGO_SCALE, y * PANGO_SCALE, index, trailing)) { + /* pretend it is a character on the far right */ + index = 99; } + drag_field = index_to_field (index); + dragging = true; + /* make absolutely sure that the pointer is grabbed */ + gdk_pointer_grab(ev->window,false , + GdkEventMask( Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK |Gdk::BUTTON_RELEASE_MASK), + NULL,NULL,ev->time); + drag_accum = 0; + drag_start_y = ev->y; + drag_y = ev->y; } break; |