mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +01:00
fix management of undo/redo and _current_editing_context
We cannot switch on a leave event from a widget, because the undo/redo menu items must remain labelled until we are actually in a new editing context. So switch when we switch tabs or when we edit the (MIDI) cue editor
This commit is contained in:
parent
e591bc91f9
commit
8523598664
5 changed files with 12 additions and 29 deletions
|
|
@ -305,14 +305,13 @@ MidiCueEditor::canvas_enter_leave (GdkEventCrossing* ev)
|
|||
if (ev->detail != GDK_NOTIFY_INFERIOR) {
|
||||
_canvas_viewport->canvas()->grab_focus ();
|
||||
ActionManager::set_sensitive (_midi_actions, true);
|
||||
EditingContext::push_editing_context (this);
|
||||
EditingContext::switch_editing_context (this);
|
||||
}
|
||||
break;
|
||||
case GDK_LEAVE_NOTIFY:
|
||||
if (ev->detail != GDK_NOTIFY_INFERIOR) {
|
||||
ActionManager::set_sensitive (_midi_actions, false);
|
||||
ARDOUR_UI::instance()->reset_focus (_canvas_viewport);
|
||||
EditingContext::pop_editing_context ();
|
||||
}
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue