Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
Before, an improper symbol (one without the starting toekn) weren't
detected and reported to the user properly and would instead assert. Now
properly detect these and pass the error up the stack to the tool.
(Sentry issue KICAD-21J).
When editing or viewing library symbols, the files are watched for
underlying changes. If any occur, the user is either prompted to reload
(if reloading would overwrite their current edits) or the file is
silently updated to the current version on disk.
This also sets a custom assertion handler to avoid unneeded crashes when
recieving invalid SAMBA packets and turns off assertions entirely when
running in release (non-debug) mode
We need to handle both the case where the new symbol is an alias as well
as free the proper memory after loading symbols in the duplicate
Fixes https://gitlab.com/kicad/code/kicad/issues/12578
There is no technical reason for this restriction for non-power symbols, so let's remove it.
This will allow more flexibility and compatibility with other tools.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9389
When double-clicking to open a symbol, it is no longer selected in the
tree. We need to use the `GetTargetLibId()` to pick the correct symbol
(first selected, then current) when using the duplicate command
Fixes https://gitlab.com/kicad/code/kicad/issues/11034
(cherry picked from commit 802d20c409)
Also makes sure the progress dialog is closed when we're done reading
symbols (it used to stay up for much of the symbol editor initialization).
Also makes sure that any cancel in the preLoad step is honoured in the
sync step. (The preload is done because it is multi-threaded and therefore
faster than the single-threaded sync.)
Also makes sure that individual threads pay attention to the cancellation,
not just the GUI thread.
Fixes https://gitlab.com/kicad/code/kicad/issues/8372
Undo/Redo can change the symbol referenced by the symbol drawing tool.
This updates the current symbol before important steps to keep the
system synced
Fixes https://gitlab.com/kicad/code/kicad/issues/10125
(cherry picked from commit b8a7a66a0a)
There doesn't appear to be any reason why the LIBID needs to be populated
before a "save as", seeing as the user will be inputting the new lib name
and lib nickname via the dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9744
This allows the workflow:
1) Edit symbol in schematic
2) Save As to original library
Also allows the user to quickly overwrite a symbol they don't want,
either by importing over the existing symbol or creating a new one.
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.
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