Skip to content

Commit

Permalink
Only allow editing top-most MIDI region in layered view
Browse files Browse the repository at this point in the history
NoteDrag (change pitch) only works correctly for the topmost
region when using Stacked LayerDisplay. Note-grid is also only
displayed for the top layer.
  • Loading branch information
x42 committed Apr 26, 2024
1 parent 201580f commit dcb732f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gtk2_ardour/note_base.cc
Expand Up @@ -293,6 +293,14 @@ NoteBase::event_handler (GdkEvent* ev)
return false;
}

if (_region.get_time_axis_view ().layer_display () == Stacked) {
/* only allow edting notes in the topmost layer */
if (_region.region()->layer() != _region.region()->playlist()->top_layer ()) {
/* this stll allows the draw tool to work, and edit cursor is updated */
return false;
}
}

switch (ev->type) {
case GDK_ENTER_NOTIFY:
_region.note_entered (this);
Expand Down

0 comments on commit dcb732f

Please sign in to comment.