track entry to Editor so we can set the current editing context

This commit is contained in:
Paul Davis
2025-01-22 18:17:29 -07:00
parent 15a093df76
commit d8baa0b240
2 changed files with 10 additions and 0 deletions

View File

@@ -702,6 +702,14 @@ Editor::Editor ()
setup_fade_images ();
switch_editing_context (this);
contents().signal_enter_notify_event().connect (sigc::mem_fun (*this, &Editor::enter), false);
}
bool
Editor::enter (GdkEventCrossing*)
{
switch_editing_context (this);
return false;
}
Editor::~Editor()

View File

@@ -2293,6 +2293,8 @@ private:
PBD::Signal<void()> VisibleMarkersChanged;
PBD::Signal<void()> VisibleRangesChanged;
bool enter (GdkEventCrossing*);
friend class RegionMoveDrag;
friend class TrimDrag;
friend class MappingTwistDrag;