The tests for file existence and write status perform two file stats
which cause performance issues on slow network shares. Now the file
state is determined at load time and stored in the SCH_SCREEN object
so file access is no longer required.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9343
Escaping the document file (.dcm) alias names breaks the link between the
document file and the library (.lib) file. This causes the information in
the document file to be lost.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9130
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
Found via `codespell -q 3 -S *.po,./thirdparty -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,dout,einstance,modul,ot,overide,serie,te,,tesselate,tesselator,tht`
It's tempting to say that we don't need to exclude filename chars
from symbols, but we might regret that decision down the road. Better
to just escape them.
Fixes https://gitlab.com/kicad/code/kicad/issues/8694
The same logic block to resolve possible symlinks exists in 5 different
places now. This change moves this duplicated code to a static member
function of WX_FILENAME instead.
Use `realpath(3)` instead of `readlink(3)`, which offers support for
relative and absolute symlinks alike, since all symbolic links will be
resolved to the absolute path of the linked-to file.
Fixes#8082
This was leaking windows headers and partial wx headers to 1084 compilation units......
This also means math/util.h is leaking to 1084 compilation units which seems a bit high too.
Differentiates better between the EDA_ITEM IsModified(), referring to
items themselves changing and the EDA_SCREEN IsContentModified(),
referring to whether we have made any unsaved changes.
This fix required sorting all of the LIB_PART draw items to ensure
accurate comparison between the symbols stored in the schematic and the
original library symbols. This has a noticeable impact on symbol library
load performance. It may also cause significant changes the next time
the library is saved due to changes in the draw item sorting. Hashing
may be a better solution here but this addressed the immediate problem.
A skeleton method SCH_SCREEN::SwapSymbolLinks() was added because there
is most likely an issue with orphaned symbols in the schematic library
symbol cache during undo/redo operations. More testing is required to
verify this.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7263
cacheLib() can cause a re-load event, which requires the C-locale.
LOCALE_IO needs to be set before this event to prevent mistaken ','/'.'
mixups
Fixes https://gitlab.com/kicad/code/kicad/issues/6434