MitjaNemec / Kicad_action_plugins

Kicad action plugins
415 stars 62 forks source link

Fix for empty lines at the end of .sch files #124

Closed stefanfrick closed 3 years ago

stefanfrick commented 3 years ago

Empty Lines at end of schematic files

Mainly a fix for empty lines at the end of .sch files. Kicad 5.1.9 seems to have introduced empty lines at the end of schematic files. This falls over in the archive_project.archive_symbols() when calling line_contents[]. Now the iteration over all lines stops when the line reads . This has not been thoroughly tested. This fix is implemented from lines 526-531

Maintain nice format of file

Every line in the sch file is now ended with a newline (line 528). Needed removal of newline character in line 433

Some typos fixed

symbols_form_missing_libraries -> symbols_from_missing_libraries othrerwise -> otherwise (line 523)

MitjaNemec commented 3 years ago

Thanks for your contribution, and thanks for the nicest PR message not too short and not too long.

It took a while as I've had to check all the convoluted logic I have in the plugin (man I am glad V6 symbols are cached in the schematics)