dictation-toolbox / natlinkcore

Other
4 stars 4 forks source link

grammars are not unloaded when a new user profile is started #55

Closed quintijn closed 11 months ago

quintijn commented 11 months ago

As long as the language remains the same, this will probably not be an issue.

But... when the user language changes, all grammars should be unloaded and the a fresh load of all grammars should be done. Now when changing from 'enx' to 'nld' for example, loaded grammars from the previous language remain loaded, including duplicate commands.

I would suggest this should be done in all cases of in loader.py on_change_callback, line 403.

I do not see immediately how all loaded grammars can be unloaded first, before the "trigger_load" function is called.

quintijn commented 11 months ago

solved with 5.3.7 (in branch natlinksettingsdir): added function unload_all_loaded_modules, which is called in on_change_callback