Commit 8f1fc61c authored by Marc Durdin's avatar Marc Durdin
Browse files

fix(windows): crash deleting wordlist

Fixes #4393.
Fixes KEYMAN-DEVELOPER-46.
Fixes KEYMAN-DEVELOPER-45.

This arose because deleting a tab caused Delphi VCL to switch to another
tab in the page control, which is IMHO a bug in the TPageControl VCL
component. Furthermore, when the active page is changed under these
circumstances, the normal OnChange and OnChanging events are not fired,
which means that the Source tab (which is the lucky tab to be activated)
never gets initialised. This cascades eventually to a crash due to the
Source tab's text editor not being properly loaded.

Two parts to this fix:

1. Restore the active page when we delete a wordlist tab (RSP-32327);
   this does not resolve the crash but does avoid weird side-effect of
   the active tab changing.
2. Initialise the source tab when we load the form so that the
   initialisation issue described above is avoided.

A separate fix in modelTsProjectFile avoids a (handled) null variant
conversion exception.
parent 01645ff8
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment