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
|
@ -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…
Reference in New Issue