Check for symbol libraries that somehow ended up in the project file
after remapping occurred and remove all of them to prevent potentially
broken symbol library links.
Add nagware dialog to warn the user and a checkbox to never show the
dialog again.
Fixes lp:1838185
https://bugs.launchpad.net/kicad/+bug/1838185
(cherry picked from commit 8789ab9265)
Remove an existing sheet from the current page that requires a schematic
load from file to prevent a corrupt screen list from causing a segfault.
Merge the edit sheet file loading with the append schematic code since
they are functionally the same. This allows the sheet edit code to
take advantage of all of the added broken symbol library links added in
the recent append schematic fixes.
Fixes lp:1835841
https://bugs.launchpad.net/kicad/+bug/1835841
(cherry picked from commit b595dc0d3b)
Do not add cache library from another project to old library list. This
is wrong and can cause all kinds of symbol library linking issues. It's
better to force the user to fix broken symbol library links than the false
security of using multiple cache libraries.
Use correct paths when appending schematic outside of the current project
path when hierarchical sheets are appended. If the path can be relative,
give the user the option to use either relative or absolute paths.
Do not change symbol library names in schematics appended from a source
outside the current project. This will almost ensure the symbol library
links will be broken in the source project.
When the appended schematic is from another project, attempt to check all
of the possible combinations of symbol library table importing that could
cause broken symbol library links and give the user the option of canceling
the append operation or live with the possibility that there may be broken
symbol library links.
When the append schematic is in the current project path but not part of
the schematic, check to see if there are any library nicknames that do
no exist in the project symbol library table and give the user a chance
to cancel the append process.
(cherry picked from commit 9fae30162d)
While we do not generate these arcs internally, some external tools
generate arcs that are technically valid but display correctly only
because of an oddity in the degeneracy mapping.
Fixes: lp:1838557
* https://bugs.launchpad.net/kicad/+bug/1838557
This fixes the last suffix that was missed by 168fa09f5. The schematic
backup files should have the suffix .sch-bak to distinguish from
.kicad_pcb-bak or other backups.
This reverts commit 216573bf48,
because the issue with net names containing '/' is not actually inside the netlist.
This commit 2165 creates issues with ngspice 2.8 and older, and do not fix anything in ngspice
1) Generate refreshPreview events so the modern toolset doesn't
fall behind by one event (see LP:1818667)
2) In the legacy toolset don't call unimplemented routines and don't
snap to grid on the non-movement axis.
If Symbol Editor isn't open then Eeschema needs to read in the
default line width.
Symbol Editor was failing to write line width parameter back to
properties.
Fixes: lp:1835051
* https://bugs.launchpad.net/kicad/+bug/1835051
(cherry picked from commit ef03afe289)
* Implement proper natural sorting of the reference values
* Perform quoting of all items in BOM generators that use csv.writer
Fixes: lp:1833822
* https://bugs.launchpad.net/kicad/+bug/1833822
Prevent the symbol and footprint library table editors from substituting
the current project path (${KIPRJMOD}) when adding libraries to the global
library table. This will almost assuredly fail when opening a different
project. We still allow users to manually use ${KIPRJMOD} in global table
paths under the assumption that if they are typing this in then they most
likely understand environment variable substitution.
Fixes lp:1830694
https://bugs.launchpad.net/kicad/+bug/1830694
(cherry picked from commit 288982b15d)
Prefix the sheet name with "Sheet: " and the sheet file name with "File: "
when plotting so that it matches the display sheet rendering.
Improve the root sheet plot file name.
Fixes lp:1832081
https://bugs.launchpad.net/kicad/+bug/1832081
(cherry picked from commit 7235da0979)
And place bitmaps behind other items. This ensures they are drawn in
the background of the page rather than covering schematic elements.
This also hacks around the buggy wxPostScriptDC implementation that
resets the page to print an image.
Fixes: lp:1819934
* https://bugs.launchpad.net/kicad/+bug/1819934
The grid apply code was always preventing empty fields. Change this the
broken behavior to allow any field to be empty except the reference and
value fields.
Fixes lp:1832722
https://bugs.launchpad.net/kicad/+bug/1832722
(cherry picked from commit d74ec1a1b2)
DIALOG_EXIT was not being laid out correctly after setting the dialog
message. Rather than fix our custom DIALOG_EXIT, wxMessageDialog and
wxRichMessageDialog were substituted as direct replacements for all
of the variants of DIALOG_EXIT. This make message dialogs appear more
consistent because wxMessageDialog uses the default platform message
dialog and wxRichMessageDialog uses the default platform rich message
dialog on windows.
Remove DIALOG_EXIT_BASE as it is no longer required.
Fixes lp:1832899
https://bugs.launchpad.net/kicad/+bug/1832899
(cherry picked from commit 3f665318f4ab5c02b7d3c29b5233a273fdac2e4e)
A bug in LIB_MANAGER::LibraryExists() prevented a library removed from
the symbol library table from being removed from the tree view. Add the
proper check to SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync().
This exposed another issue with synchronization between the library
table editor and the tree view which could lead to orphaned library
modifications and/or a segfault when the currently selected library was
removed from the symbol library table. Give the user a chance to save
or revert any changes before allowing changes to the symbol library
table.
Fixes lp:1821691
https://bugs.launchpad.net/kicad/+bug/1821691
(cherry picked from commit 028973d182)
The block draw function is called during the mouse capture callback. It
shouldn't be called after the block size is finalized.
Fixes: lp:1832289
* https://bugs.launchpad.net/kicad/+bug/1832289
Since Eagle does not connect stacked NC pins but KiCad will if the pins
are coincident, we choose to only import the first of the stacked NC
pins. While this creates symbols that are slightly different in pin
count from the Eagle version, it keeps the schematic and netlist
functionally correct relative to the Eagle version.
Fixes: lp:1821319
* https://bugs.launchpad.net/kicad/+bug/1821319
Building custom targets that depend on custom commands such as our
keyword lexer requires two layers of indirection to pick up changes
properly and not overwrite the same file in parallel builds.
Fixes: lp:1831643
* https://bugs.launchpad.net/kicad/+bug/1831643
(cherry picked from commit c6af38477d)
The mouse capture has a cleanup associated that we call to cancel the
action. This prevents issues when trying to copy between hierarchical
sheets.
Fixes: lp:1819278
* https://bugs.launchpad.net/kicad/+bug/1819278
Refresh the currently edit sheet screen symbol links when the sheet file
name is changed.
This fix was better than the previous fix as it was the same diff between
the master and 5.1 branches.
https://bugs.launchpad.net/kicad/+bug/1830315
Fixes lp:1830315
(cherry picked from commit 89ada624d3d3b28ad5ee1477b353501d46dae3a2)
This fixes multiple issues when importing Eagle V6 files.
Crashes occured when arcs of 0-length were found and when parts were
referenced in the schematic that were not found in the library. This
could happen if the library and schematic were different cases.
Fixes: lp:1830564
* https://bugs.launchpad.net/kicad/+bug/1830564
(cherry picked from commit 0e5cc54ec9)
This only applies to the root symbol when the datasheet field is not
empty and the datasheet for root symbol alias in the document file is
empty. Use the root symbol datasheet field value when adding a new
symbol that meets this criteria.
The root symbol datasheet field gets copied to the root symbol alias
datasheet member variable so if the symbol is modified and saved, the
datasheet information is saved in the .dcm file.
https://bugs.launchpad.net/kicad/+bug/1830078
Fixes lp:1830078
(cherry picked from commit c52ff1ca23)
This only applies to the root symbol when the datasheet field is not
empty and the datasheet for root symbol alias in the document file is
empty. Use the root symbol datasheet field value when adding a new
symbol that meets this criteria.
https://bugs.launchpad.net/kicad/+bug/1830083
Fixes lp:1830083
(cherry picked from commit 300f5cb082)
KiCad does not allow references to be numeric only. This prefixes such
references with "UNK" to note that the reference designator type is
unknown.
(cherry picked from commit a62a89eac3)
This is a stop gap fix. It should be possible to use the wxFrame title
string for this but some of the frame windows have appropriated the title
string for configuration file naming purposes which is less than ideal.
Fixes lp:1825977
https://bugs.launchpad.net/kicad/+bug/1825977
(cherry picked from commit 3c4f8c1bf7)
Prevent user from pasting text with carriage return and/or line feed
characters in field value edit control in the schematic symbol and symbol
library properties dialogs.
Make all objects derived from GRID_CELL_TEXT_BUTTON use validators
correctly.
Add validators to FIELDS_GRID_TABLE object for field values other than
the mandatory fields.
Create a validator to check that a string is a valid LIB_ID.
Fixes lp:1828214
https://bugs.launchpad.net/kicad/+bug/1828214
(cherry picked from commit ae54f34392)
When, inside a complex hierarchy, one switch from an instance of a sheet to an other instance of this sheet,
the page number shown in the worksheet was not updated on screen, and the initial number was displayed.
Fix from master branch.
Force the symbol library links whenever the symbol library table has been
modified. This will use the cache as a fallback when a library has been
removed that contains links in the schematic rather than display.
Fix the SCH_COMPONENT symbol resolver when falling back to the cache. The
resolver was using the LIB_ID ':' notation which was failing. Replacing
':' with '_' fixed this issue. This was also an issue when generating the
symbol message panel information.
Convert wxLogDebug to wxLogTrace in symbol resolver code path. Add new
trace type KICAD_SYM_RESOLVE.
Fixes lp:1821606
https://bugs.launchpad.net/kicad/+bug/1821606
(cherry picked from commit 7d803437e2)
When Pcbnew's add footprint browser is run up, it constructs
the recently used list without checking for nulls.
Although the DoAddLibrary call does internally check for
null, it's easier to filter these out before placing into
the vector in the first place.
The same logic in the symbol tree is already handled in the
same way.
(cherry picked from commit 42d20cbd96)
This can be helpful when tracing where certain configurations
come from (some apps load from other apps' config basenames).
(cherry picked from commit fcc4a84e0e)
Currently, this widget doesn't read the common library settings.
This means it doesn't use the configured DPI scaling or anti-aliasing
settings.
Use the ReadConfig method on the GAL options to fix (rather than
only ReadAppConfig).
Fixes: lp:1825913
* https://bugs.launchpad.net/kicad/+bug/1825913
(cherry picked from commit 33fe9a2761)
These dialogs had logic to avoid a table re-adjustment unless
the width changed. This was done to avoid spurious resizing
calls under GTK+3. This was commit
13249b723b, fixing bug lp:1817810.
However, by only calling event.Skip() when the width changed,
redraws were inhibited when only the height changed.
Placing the Skip() outside the width-change check fixes this,
and does not re-introduce the lp:1817810 bug (it is the column
adjust call that causes that).
Fixes: lp:1826615
* https://bugs.launchpad.net/kicad/+bug/1826615
(cherry picked from commit eccadd92fb)
In the component, an m_unit/m_convert element is 1-indexed as opposed to
the library where they are 0-indexed. The 0-index in the library is
reserved for those elements that are shared across all conversion/unit
whereas it is invalid for the component.
Fixes: lp:1824764
* https://bugs.launchpad.net/kicad/+bug/1824764
When displaying a sheet from this path, it's possible the sheet will
not have been initialized yet. Call DisplayCurrentSheet() to make sure
it is initialized, and then call RedrawScreen to update the zoom level.
Fixes: lp:1824362
* https://bugs.launchpad.net/kicad/+bug/1824362
Move repeated GAL config reading routines into GAL_DISPLAY_OPTIONS.
THe app-level config is in here already, do the same for the
common config.
This means that the configs are loaded consistently, which fixes
the symbol-chooser preview window, which previously didn't use the
same config routine as other GAL canvases.
Future work could move these functions to free functions that
act on the public interface of GAL_DISPLAY_OPTIONS to avoid
GAL_DISPLAY_OPTIONS having to know about wxConfig and wxWindow.
Fixes: lp:1824524
* https://bugs.launchpad.net/kicad/+bug/1824524
(cherry picked from commit ab2281d26f)
Save and restore text thickness in SCH_TEXT::Plot() function to prevent
the plotting default thickness value from stepping on the original text
thickness and causing all of the text objects to magically change to bold.
Fixes lp:1823165
https://bugs.launchpad.net/kicad/+bug/1823165
(cherry picked from commit 3d33cba574)
Adjust the sizer proportions slightly to eliminate the reported bug.
This may not be the ideal way to do this and there could be some issues
on other platforms but it does resolve the issue on gtk3.
Fixes lp:1820084
https://bugs.launchpad.net/kicad/+bug/1820084
(cherry picked from commit 615c49315f)
Apparently at some point in KiCad's development, a '~' character was
prefixed to the symbol name to indicate that it was not visible. The
visibility state is now saved in the name field so remove the prefix.
The parser was kept unchanged.
Fixes lp:1632048
https://bugs.launchpad.net/kicad/+bug/1632048
(cherry picked from commit ee14da3093)
Redesignate the eagle test as eeschema tests and build
more like the other unit tests.
Enable as a test in Ctest now that the test executes without
crashing.
The loading of the file with the hardocded part is still
not enabled, as this needs more infrastructure to support it.
(cherry picked from commit 4eb30f6b85)
Statically constructing wxCursors as used for the probe
and tune cursors crashes the qa_eagle_plugin test
instantly.
Fix this by introducing a new class CURSOR_STORE,
which allows to abstract the platform wierdness of wxCursors
and allow the simulator to laziliy init its own cursors
at runtime.
This code isn't properly tested, as these cursors are never
actually used. However, it does allow the eeschema unit test
to run.
Fixes: lp:1781191
* https://bugs.launchpad.net/kicad/+bug/1781191
(cherry picked from commit 6f1c3f5ef8)
Save/restore default netclass.
Read layers back in with correct syntax ('.' between keyword and layer name).
Write layers to project file.
Read/write layer enablement bits.
Don't set solder paste margin min to 0 (most of them are negative).
Fixes: lp:1811990
* https://bugs.launchpad.net/kicad/+bug/1811990
Make a few things const (specficially the reference into
m_fieldStore - we should commit to not modifying that in this
function.
Also avoid a couple of needless string copies.
Also explicitly dereference the into a (non-const) reference at the outset.
For the whole if this function, comp is the same object and may not
be null (as it is used unchecked).
(cherry picked from commit edd94ce2d6)
For now fields created in Fields Editor are placed at
position (0, 0).
Every new field must be placed at the origin of
the parent component.
(cherry picked from commit 11f03c8551)
Make the "Define as power symbol" checkbox tooltip more descriptive so
the user has a better understanding of enabling this option.
Fixes lp:1804932
https://bugs.launchpad.net/kicad/+bug/1804932
(cherry picked from commit a7c8df5666)
Autosave was not working correctly, partly due to different
implementations in eeschema and pcbnew and partly due to a mistaken
refactor at some point during v5 development. This unifies the expected
autosave prefix to _autosave- for both pcbnew and eeschema. It also
unifies the expected suffix for the backup files to -bak.
Fixes: lp:1820433
* https://bugs.launchpad.net/kicad/+bug/1820433
(cherry picked from commit 078320e2fb)
Call base object TransferDataFromWindow() to prevent Validate() from
being called twice. Validation is handled completely under the hood
so there is no need to call Validate() directly.
Fixes lp:1820301
https://bugs.launchpad.net/kicad/+bug/1820301