From da2043e179c9d6c945d2f4b153ace561282f62f7 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 17 Dec 2014 03:17:07 -0500 Subject: [PATCH] Force ghost note positive in all circumstances. --- gtk2_ardour/midi_region_view.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index cbd8596ea1..0b14ca6a7a 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -3580,6 +3580,8 @@ MidiRegionView::selection_as_notelist (Notes& selected, bool allow_all_if_none_s void MidiRegionView::update_ghost_note (double x, double y) { + x = std::max(0.0, x); + MidiTimeAxisView* const mtv = dynamic_cast(&trackview); _last_ghost_x = x; @@ -3623,13 +3625,9 @@ MidiRegionView::create_ghost_note (double x, double y) _ghost_note = new Note (*this, _note_group, g); _ghost_note->set_ignore_events (true); _ghost_note->set_outline_color (0x000000aa); - if (x < 0) { x = 0; } update_ghost_note (x, y); _ghost_note->show (); - _last_ghost_x = x; - _last_ghost_y = y; - show_verbose_cursor (_ghost_note->note ()); }