mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-18 19:43:24 +03:00
* Fix UICodeEditorSplitter dropping its widget listeners on tab moves:
UITabWidget reports drag & drop transfers as OnTabClosed + OnTabAdded,
so treating OnTabClosed as "left the splitter" permanently unhooked the
moved widget and left mCurEditor/mCurWidget tracking nothing
(SpartanJ/ecode#958).
* Tie splitter-owned callbacks to splitter membership: attach on
OnTabAdded of managed tab widgets, detach on OnTabClosed. Creation and
transfer now share one registration path; moves to external tab
widgets stay detached.
* Keep mEditorSelections for the editor lifetime instead of the tab
membership lifetime: it survives split moves and is cleared from the
editor OnClose callback, which is disconnected in the splitter
destructor so outliving editors cannot call into a destroyed splitter.
* Apply the same ownership model to UITabWidgetSplitter, which had the
inverse bug: widgets dragged out kept notifying the splitter through
stale connections; drop the duplicated closeTab() cleanup.
* Store listeners as Scene::EventConnection/List (RAII disconnect)
instead of std::vector<Uint32> + removeEventListener bookkeeping.
* Add regression tests covering editor and generic widget moves between
splits, in and out of the splitter, focus/title tracking after each
transition, selection cache survival, and editor destruction cleanup.