diff options
author | André Nusser <andre.nusser@googlemail.com> | 2015-12-02 11:20:56 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2016-01-12 13:45:39 +0100 |
commit | f979d9c0a633181e75721eb4ddb7cf43333f529d (patch) | |
tree | 0e02255527d5d252bd16f879f37e84884cba9ccb /gtk2_ardour | |
parent | 616c1aa0ce17f897d769ab029f91e9fd3986e655 (diff) |
Don't show a ghost note when draw mode is entered over a note.
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/midi_region_view.cc | 44 |
1 files changed, 25 insertions, 19 deletions
diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index 22d1488367..cab955ed3d 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -609,33 +609,32 @@ MidiRegionView::motion (GdkEventMotion* ev) { PublicEditor& editor = trackview.editor (); - if (_note_entered) { + if (!_note_entered) { - remove_ghost_note (); - - } else if (!_ghost_note && editor.current_mouse_mode() == MouseContent && - Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier()) && - _mouse_state != AddDragging) { + if (!_ghost_note && editor.current_mouse_mode() == MouseContent && + Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier()) && + _mouse_state != AddDragging) { - create_ghost_note (ev->x, ev->y); + create_ghost_note (ev->x, ev->y); - } else if (_ghost_note && editor.current_mouse_mode() == MouseContent && - Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier())) { + } else if (_ghost_note && editor.current_mouse_mode() == MouseContent && + Keyboard::modifier_state_contains (ev->state, Keyboard::insert_note_modifier())) { - update_ghost_note (ev->x, ev->y); + update_ghost_note (ev->x, ev->y); - } else if (_ghost_note && editor.current_mouse_mode() == MouseContent) { + } else if (_ghost_note && editor.current_mouse_mode() == MouseContent) { - remove_ghost_note (); - hide_verbose_cursor (); + remove_ghost_note (); + hide_verbose_cursor (); - } else if (editor.current_mouse_mode() == MouseDraw) { + } else if (editor.current_mouse_mode() == MouseDraw) { - if (_ghost_note) { - update_ghost_note (ev->x, ev->y); - } - else { - create_ghost_note (ev->x, ev->y); + if (_ghost_note) { + update_ghost_note (ev->x, ev->y); + } + else { + create_ghost_note (ev->x, ev->y); + } } } @@ -3328,10 +3327,17 @@ MidiRegionView::note_entered(NoteBase* ev) Editor* editor = dynamic_cast<Editor*>(&trackview.editor()); if (_mouse_state == SelectTouchDragging) { + note_selected (ev, true); + } else if (editor->current_mouse_mode() == MouseContent) { + + remove_ghost_note (); show_verbose_cursor (ev->note ()); + } else if (editor->current_mouse_mode() == MouseDraw) { + + remove_ghost_note (); show_verbose_cursor (ev->note ()); } } |