The legacy symbol library plugin code was changed to escape symbol names
which broke the LIB_ID string comparison when checking to see if symbols
needed to be rescued. Escaping the LIB_ID names before comparison resolves
the issue.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11563
When the user asks to mirror a symbol is is frequently to get the
reference/value on the other side of the symbol for placement purposes.
Autoplacing the fields here keeps the text where they were initially
which can be frustating to work around.
This commit treats the mirror command as a user request to change where
the fields are
Previous use of instance was as an "override" of the default value.
This has changed to be used as the primary storage location for all
values. This means that we cannot clear the instance data when setting
a new value for all instances, instead we have to change the instance
data and the default value is superfluous
Fixes https://gitlab.com/kicad/code/kicad/issues/11439
EE_INSPECTION_TOOL::UpdateMessagePanel was called by EVENTS::SelectedEvent
But This event after commit calls E_INSPECTION_TOOL::CrossProbe(),
and no longer UpdateMessagePanel.
So CrossProbe() now calls UpdateMessagePanel.
Fixes#11447https://gitlab.com/kicad/code/kicad/issues/11447
Pin names like "+V" were incorrectly parsed as doubles leading to broken
comparisons. These caused heap overflows when sorting pin tables
This corrects the comparison so that numeric sorts are only performed
when there is an actual number in the symbol segment. Also adds unit
tests for common error cases
Our menu bar code is interestingly complex. But we were throwing away newly made menu items to the void in the cases of constructed on the fly submenus
CHANGED: The text variable ${SHEETNAME} now always represents the name of the
sheet when used anywhere in the schematic editor, including the title block
ADDED: A new text variable ${SHEETPATH} which is replaced with the path to the
current sheet - e.g. "/Sheet 1/Sheet 2".
To ensure backward compatibility, the default drawing sheet now uses
${SHEETPATH}. Custom drawing sheets will need to be manually edited.
Prior to fixing the schematic file change churn do to instance data
changing to the last selected sheet instance, the symbol instance data
was set rather than empty. This change allows for users to set the
default instance data which is used for every new instance of the
schematic.
ADDED: Default schematic symbol instance data (unit and reference, value,
and footprint fields) can be set to be used as the default settings
for all new instances of the schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11113
This also fixes a failure to use the correct effective width for
shapes (which might, for instance, inherit their widths from schematic
defaults, netclasses, etc.).
Fixes https://gitlab.com/kicad/code/kicad/issues/11358
Better to have both the single-pin error message and the non-driven
error message when an input pin is not connected than miss error
messages when the pin is connected to a blank net
Fixes https://gitlab.com/kicad/code/kicad/issues/10430
(cherry picked from commit e740db61f5)
Make "don't stroke" an explicit property in the GUI.
Silently enforce line width to >= 0 when stroking.
Make layouts between dialogs more consistent.
Interpret unspecified fill colour as layer colour.
Fixes https://gitlab.com/kicad/code/kicad/issues/11279
Destructor of SIM_PLOT_FRAME calls sim->Attach( nullptr ) in order to destroy
circuit model (former netlist exporter). If this is skipped, eeschema crashes
when program is closed. nullptr is a valid parameter for Attach()
- fix irrelevant warning message box when tuners moved
too quickly and simulation was slow
- fix for rerun simulation when tuning and result tab was changed
SIMULATOR has now an Attach() method, which should be called
with proper SIMULATION_MODEL that should be simulated, before calling Run()
Concrete class of SIMULATION_MODEL for ngspice is NGSPICE_CIRCUIT_MODEL,
renamed from NETLIST_EXPORTER_PSPICE_SIM. DIALOG_SIM_SETTINGS relies
on above mentioned object, so it was added as an argument of the constructor.
Now that we are dealing with individual connection elements that do not
update their connected elements as well, we can thread the update, just
being careful to guard any remaining updates (bus_enty/busLine) that
need reciprocal updating
Fixes https://gitlab.com/kicad/code/kicad/issues/10974
(cherry picked from commit 6a53e318e5)
If the SCH_ITEM has already been processed, the extra time needed to
iterated over the memberset and get the SCH_CONNECTION when we won't use
it is not neccesary.
Fixes https://gitlab.com/kicad/code/kicad/issues/10974
(cherry picked from commit 776a28a10e)
Normally, you will gain by resursing a nested loop only over the
pairs that are not already handled. In this case, however, you lose
time because you step outside of the cache by adding the reciprocal test
at each step.
Instead, we process one element at a time, keeping it cached and loop
over all other elements to add to the connection. This saves us about
75% of the time for larger loops (e.g. stacked power pins on a large
BGA)
Fixes https://gitlab.com/kicad/code/kicad/issues/10974
(cherry picked from commit 3a98eacdb9)
Fixes:
* Various special cases around junctions on pins and dragging.
* Some rotations of endpoints resulting in a 45 degree rotate.
* Some cases where it was possible to get a line with neither
endpoint selected, and also substractive unselecting only one of two
selected endpoints unselecting both.
* Use line midpoint for sorting. Start and endpoints aren't
consistent in the order they appear on the X or Y axis. So,
we need to use the midpoint for our position for consistent
sorting when dragging groups of parallel lines where some
have the start and end reversed.
Other:
* Rename TEMP_SELECTED TO SELECTED_BY_DRAG. This is the actual meaning
of the flag, and should reduce confusion as
to when it should be used.
* Move usage of TEMP_SELECTED as an algorithmic mark to CANDIDATE
instead.
* Fix mistaken clearing of START_POINT and ENDPOINT.
* Move endpoint setting and clearing out of narrowSelection, and into
selectPoint and selectMultiple.
* Don't show dangling end warnings on new lines
In symbols, a polyline descr is already a true polyline / polygon descr.
In schematic, a polyline descr was restricted to only 2 points (a line).
A true polyline / polygon descr is now allowed in schematic that support already
polygons.
For compatibility reason, a 2 points polygon (SCH_SHAPE) is converted to a SCH_LINE.
MapAngles() will modify parameters and C++ does not guarantee LTR
evaluation, so we need to separate the calls into the proper order
before comparing the returns
Fixes https://gitlab.com/kicad/code/kicad/issues/11135
Do not use the symbol field string to populate the value and footprint
grid cells. The field strings may be empty because the symbol has not
been instantiated yet by entering a sheet. This fix makes an incorrect
assumption that the first instance value and footprint data in the symbol
is the same for all instances.
Note: this fix is incomplete because the value and footprint fields are
can now be different between sheet instances. The entire field
table editor design will need to be rethought because the current
grouping doesn't allow different value and footprint instance
changes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11194
Previously, coordinates were clamped to +- 60 inches. It makes no sense to
clamp them at plotter level: max cooed depends on the editor (schematic/board...)
Rename MAX_PAGE_SIZE_MILS to MAX_PAGE_SIZE_EESCHEMA_MILS and use it only for Eeschema.
Fixes#11196https://gitlab.com/kicad/code/kicad/issues/11196
There was also a logic bug when the selected schematic was in a different
path than the current project and was already part of the current project.
The symbol library table reconciliation code was still run which was wrong.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11075
SPICE simulator can be called also during IBIS model determination,
and in the future in ERC. Therefore a necessity arises to implement
exclusive access.
We want to shorting the processing time by marking symbols that have
already been processed. But we must avoid marking symbols that will not
be processed due to their other flags
Fixes https://gitlab.com/kicad/code/kicad/issues/11164
(cherry picked from commit 2208e0db16)
Needed to find bottlenecks in fns, so break out individual sections of
the massive function for easier understanding.
buildItemSubgraphs (one section of the previous function) would build
millions of connections that were never used as stacked pins created X!
connections. Also tested using sets instead of lists and keeping unique
lists to avoid flagging but none of these were as performant as using
flags to remember which items had already been processed.
Fixes https://gitlab.com/kicad/code/kicad/issues/10974
(cherry picked from commit 17b1b68ac7)
The previous solution cleared all of the fields and force the unit setting
to unit one which would have less than desirable effects when reusing a
schematic in another project. This solution forces all of the instance
settings to the first sheet instance of the current project to prevent file
change churn when changing shared sheets in the current project.
This will not prevent shared schematic file changes when the first sheet
instance data differs between projects.
Also make sure that value field is updated from name changes when the
symbol is a power symbol (even if it's from the schematic instead of
the library).
Fixes https://gitlab.com/kicad/code/kicad/issues/11093
Double-calls are no longer needed when using settings. They can
interfere depending on how the system executes the commands.
Removing keeps the last used plugin as the default, rather than the last
selected
Fixes https://gitlab.com/kicad/code/kicad/issues/11094
(cherry picked from commit e8ef863861)
Adding a page in the ctor can generate events that change the default
page. Instead, we set the default after all pages have been added,
avoiding the reset
Fixes https://gitlab.com/kicad/code/kicad/issues/10910
(cherry picked from commit 5314ba6440)
Avoid excess writes to the project directory to dodge issues with remote
file systems not fully writing data.
wxRename works across disk boundaries (in theory) and falls back to
wxCopy/wxRemove when it fails
Fixes https://gitlab.com/kicad/code/kicad/issues/10747
MapAngles will adjust by small amounts the angles t1 and t2. This
adjustment will determine the CW/CCW drawing. Therefore, the MapAngles
needs to be called explicitly before the Normalize180() call.
Left-to-Right evaluation is not a given for MSVC
Fixes https://gitlab.com/kicad/code/kicad/issues/11050