Also cleans up the dialog a bit.
Also changes the workings of NormalizePath to return the input if
it couldn't be shortened which saves open coding that behaviour in
all its callers.
Fixes https://gitlab.com/kicad/code/kicad/issues/9036
- Fix file extension for new project
- Fixes for exceptions on MSW
- Fix some ASAN issues
- Allow SETTINGS_MANAGER to run headless
- Don't flag schematic as modified after schematic setup is closed
- Don't automatically unload projects when LoadProject is called
- Don't unload project if it's the same as the current one
- Make sure to properly init/de-init template field names
The NormalizePath() function always added a trailing separator when
normalizing environment variables. Now it checks an environment
variable for a trailing separator and only adds one if it doesn't
already exist.
May be a partial fix for:
Fixes lp:1733217
https://bugs.launchpad.net/kicad/+bug/1733217
SEARCH_STACK is a deprecated method for getting the list of paths where
one could look for a file. Instead it tries the project path and
environmental variables.