Commit Graph

232 Commits

Author SHA1 Message Date
Jeff Young 6810912f09 Refuse to load schematics from the future.
Also fixes a bug where an empty window would get left when loading
a file from the KiCad manager window errored out.

Also fixes a bug where we were getting the wrong exception because
we were rethrowing the type-casted one (rather than just calling
throw).

Fixes https://gitlab.com/kicad/code/kicad/issues/8604
2021-06-30 18:32:07 +01:00
Jeff Young 5cac8afe1d Remove long-dead revision support for LIB_IDs. 2021-06-30 13:12:57 +01:00
Jeff Young b1b4caee6a Escape "naughty" characters in symbol names.
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
2021-06-30 13:12:57 +01:00
Jeff Young a1dfc36233 More error message regularization. 2021-06-29 01:08:26 +01:00
Jeff Young 062c4fda62 More error message regularization (and translatability improvements). 2021-06-28 00:45:24 +01:00
Jeff Young 4aa8318dc2 More error message regularization. 2021-06-27 14:24:02 +01:00
Jeff Young 0dfb5fcaf9 Error message cleanup.
wxString::Format is redundant in a wxLogXXX call.
Error messages should generally be translatable.
Error messages should use generally consistent sentence forms.
2021-06-26 22:53:24 +01:00
Jeff Young 5c21f93803 Consistency in progress and error messages. 2021-06-26 13:23:43 +01:00
Jeff Young 8502fd6877 Divide-by-zero safety. 2021-06-24 12:18:22 +01:00
Jeff Young 5fa5a73c6d File open/import progress dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/6864

Fixes https://gitlab.com/kicad/code/kicad/issues/2166
2021-06-23 23:55:54 +01:00
Jeff Young 6d223931fb Convert overbar syntax in bus aliases.
Fixes https://gitlab.com/kicad/code/kicad/issues/8647
2021-06-21 20:13:21 +01:00
Mikolaj Wielgus 19f76ae77c Convert pin names to new overbar format
Fixes bug 6 of https://gitlab.com/kicad/code/kicad/issues/8591, thereby
closing the issue:

Fixes https://gitlab.com/kicad/code/kicad/issues/8591
2021-06-20 09:00:16 +00:00
Jeff Young d811ae0aa3 Improved ASCII art. 2021-06-18 12:01:16 +01:00
jean-pierre charras c35cceca62 fix compil warnings ( "multi-line comment" ) and missing override 2021-06-18 09:38:19 +02:00
Jeff Young bdeeace2ab More Eagle importer fixes.
1) Don't process wires more than once when looking for bus entries.
2) Don't allow processing a wire to mess up iteration over the RTree.
2021-06-17 18:16:38 +01:00
Jeff Young b10f156dd0 Don't convert overbar syntax in most fields.
You probably do want it in VALUE, but not REFERENCE, and certainly
not FOOTPRINT or DATASHEET.  User fields are more likely to be
part numbers, etc. (and don't want conversion).

Fixes https://gitlab.com/kicad/code/kicad/issues/8617
2021-06-17 00:05:17 +01:00
Jeff Young c23c5b7f18 Allow import of Eagle schematics without libraries. 2021-06-16 22:02:50 +01:00
Jeff Young 4b28bac89a Fixes for Eagle importer.
1) Make sure we set an absolute path on the sheet.
2) Don't mix RTree iterators; wires get skipped between buses.
3) Implement a real ERC error so we don't assert.

Fixes https://gitlab.com/kicad/code/kicad/issues/7042
2021-06-16 21:44:18 +01:00
Jeff Young 21b869bd1f Fix a few cases missed in the last merge.
Fixes https://gitlab.com/kicad/code/kicad/issues/7042
2021-06-16 00:01:28 +01:00
Jeff Young 3a84ee27fd First take at repairing Eagle import of bus entries.
Simplify logic by adding quadrant-based BUS_ENTRY ctor.
Fix issue with bus entry size having been in mils rather than IU.
Fix issues with logic.

Fixes https://gitlab.com/kicad/code/kicad/issues/7042
2021-06-15 23:23:47 +01:00
Wayne Stambaugh ff099453c8 Rename class_library.[h|cpp] to symbol_library.[h|cpp]. 2021-06-15 09:24:55 -04:00
Wayne Stambaugh ee3eac325d Expunge the use of the word part from Eeschema code. 2021-06-15 08:32:11 -04:00
Wayne Stambaugh fb46cd8bc5 Expunge the use of the word component from Eeschema code.
The only exception to this is the SPICE simulator's use of component
when referring to physical component (R, L, C, etc.) values.
2021-06-14 14:00:21 -04:00
Wayne Stambaugh 71c183d7bb Rename LIB_PART to LIB_SYMBOL. 2021-06-14 07:11:17 -04:00
Mikolaj Wielgus ade38f48bc Add conversion from old `~...~` to new `~{...}` notation 2021-06-11 18:40:57 +00:00
Wayne Stambaugh fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Marek Roszko d946d6e68f Cleanup some pgm_base.h includes 2021-06-08 21:56:00 -04:00
Wayne Stambaugh 9ebabb222c Pass objects by reference instead of on the stack. 2021-06-08 10:09:38 -04:00
Johannes Maibaum 022dd6072c Add utility method to resolve symlinks
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.
2021-06-07 20:59:59 +00:00
Marek Roszko fc3cea2cca Remove wx/xml/xml.h from sch_eagle_plugin.h 2021-06-06 09:34:57 -04:00
Johannes Maibaum 06e967354f Fix symlink read-/write-through code
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
2021-06-05 14:22:50 +00:00
Marek Roszko 4df3cb912d Remove another leaky wx/log.h header 2021-06-03 08:11:15 -04:00
Marek Roszko af2707929d Don't leak a wx header via eda_item.h
Turns out this provided the translation header globally :D
2021-06-02 19:18:48 -04:00
Marek Roszko eeb405c196 Cleanup some more excess math/util includes 2021-06-02 00:50:46 -04:00
Marek Roszko cf2bb5692a Remove the wxLog calls from math/util.h for now
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.
2021-06-01 18:44:22 -04:00
Marek Roszko 3ac5aa5369 enum class SHEET_SIDE 2021-05-30 21:23:46 -04:00
Marek Roszko 382dca4e6f Fix uninitialized member warnings
Based on PVS Studio report
2021-05-30 20:01:01 -04:00
Seth Hillbrand be5b281501 Cleanup RAD2DEG and unused vars 2021-05-28 12:37:57 -07:00
Roberto Fernandez Bautista 9a9c9d38e8 CADSTAR Schematic: Cleanup pins in symbols
In CADSTAR pins are single points. We can replicate the original look
of the schematic in most cases by searching the symbol for straight
segments that are coincident with the pin and use those to calculate
a suitable pin length and angle.
2021-05-28 20:13:11 +01:00
Roberto Fernandez Bautista 29d1b84939 CADSTAR Schematic: Fix positioning of symbol attributes
Symbol attributes were being placed at the wrong location
due to incorrect relative angle calculation
2021-05-28 20:13:10 +01:00
Roberto Fernandez Bautista 8d788b7a09 CADSTAR Schematic: Fix assert regarding sheet absolute path 2021-05-28 20:13:10 +01:00
Roberto Fernandez Bautista b985c4d2e9 CADSTAR Schematic: Handle scaled symbols
Create a new LIB_PART for scaled symbols. These will be then embedded
into the schematic file. However when "update from library" is done,
it will revert to the unscaled symbol.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8494
2021-05-28 20:13:10 +01:00
Seth Hillbrand 752ae4d519 Rename modification flag routines
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.
2021-05-28 12:07:04 -07:00
Roberto Fernandez Bautista be436ec977 Remove whitespace from page numbers on load and use # if page is empty
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8350
2021-05-21 22:52:47 +01:00
Wayne Stambaugh ebd53cd45c Eeschema: fix text justification terminology.
Use justification instead of orientation relative to the anchor point when
describing text direction and alignment.  This seems to be the preferred
method by most users so hopefully this will eliminate some confusion.

Fix a bug in the s-expression schematic parser that failed to take into
account how graphical text alignment is defined for graphic text objects
compared to label text objects.

Fixes https://gitlab.com/kicad/code/kicad/issues/6489
2021-05-14 13:44:17 -04:00
Jeff Young 2e3860de6f Naming conventions. 2021-05-05 22:58:40 +01:00
Marek Roszko c7345096f8 Use wxFFileInputStream explicitly when loading xml documents
wxFFile (FILE, buffered) is better than wxFile (syscalls)
2021-05-03 19:39:56 -04:00
Roberto Fernandez Bautista cf2dc06add Fix latent bugs in SCHEMATIC and SCH_SEXPR_PLUGIN
Noticed after writing the qa test: when loading a file immediately
after having loaded a previous one, it was resulting in a nullptr
exception.
2021-05-03 19:38:31 +01:00
Roberto Fernandez Bautista 5822cd85c4 Fix eeschema copy/paste: save and load sheet and symbol instances
Save sheet and symbol instance information to the clipboard on copy

Load sheet and symbol instance information from the clipboard on paste
and renumber page numbers after loading.

Correctly handle pasting in a multiple hierarchy by ensuring symbol and
sheet instances are updated for all instances of the destination sheet.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8207
2021-05-03 19:38:31 +01:00