mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
Only allow editing top-most MIDI region in layered view
NoteDrag (change pitch) only works correctly for the topmost region when using Stacked LayerDisplay. Note-grid is also only displayed for the top layer.
This commit is contained in:
parent
201580f7ba
commit
dcb732f07c
1 changed files with 8 additions and 0 deletions
|
|
@ -293,6 +293,14 @@ NoteBase::event_handler (GdkEvent* ev)
|
||||||
return false;
|
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) {
|
switch (ev->type) {
|
||||||
case GDK_ENTER_NOTIFY:
|
case GDK_ENTER_NOTIFY:
|
||||||
_region.note_entered (this);
|
_region.note_entered (this);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue