summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-12-17 03:17:07 -0500
committerDavid Robillard <d@drobilla.net>2014-12-17 03:17:07 -0500
commitda2043e179c9d6c945d2f4b153ace561282f62f7 (patch)
tree364797b4583b74e272e04187fad543e4c2082f23 /gtk2_ardour
parent733f5179484f1c2e33218086ca1ce26ef665c3f4 (diff)
Force ghost note positive in all circumstances.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/midi_region_view.cc6
1 files 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<MidiTimeAxisView*>(&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 ());
}