Commit Graph

7894 Commits

Author SHA1 Message Date
Wayne Stambaugh 3f8f90db9f Factor out common s-expression library cache source code. 2022-02-09 11:20:14 -05:00
Wayne Stambaugh 7181f0b40b Fix clang broken build. 2022-02-09 07:55:50 -05:00
Wayne Stambaugh fe82f2dd40 Factor out common schematic s-expression source code. 2022-02-08 14:44:38 -05:00
Jeff Young 58c38d2830 Don't nanny users about what constitutes quality graphics.
Fixes https://gitlab.com/kicad/code/kicad/issues/10788

Fixes https://gitlab.com/kicad/code/kicad/issues/10374
2022-02-08 17:35:48 +00:00
Jeff Young 3600b2ce3f Make sure temp sheet has a parent. 2022-02-08 17:09:17 +00:00
jean-pierre charras 2f79f579cc DIALOG_TEXT_PROPERTIES: do not show fill option for texts.
It make sense only for text boxes.
Fixes #10786
https://gitlab.com/kicad/code/kicad/issues/10786
2022-02-08 09:42:22 +01:00
Mike Williams 7c91cd73e3 Eeschema: unconnected ends of wire entries should allow auto start wires 2022-02-07 23:31:24 +00:00
Wayne Stambaugh fc3cad0b54 Hash symbol libraries per library rather than statically per cache type. 2022-02-07 15:40:21 -05:00
Kevin Lannen f9b27a53b2 Eeschema: Edit pin numbers while grouped
ADDED: The pin table pin numbers column supports editing the list of pin
numbers to add, remove, and rename pins.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/5620
2022-02-07 17:45:16 +00:00
Kevin Lannen 631d5155ef Eeschema: Pin table support for multi unit symbols
ADDED: Symbol editor pin table supports editing which unit each pin is
displayed on

Note: 6513 mentions being able to change the pin unit from the edit pin
menu. This does not add that feature.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/6513
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/5470
2022-02-07 17:45:16 +00:00
Kevin Lannen 56794ab829 Eeschema: Add pin count column to pin table
ADDED: When the pin table is showing grouped pins, display a read-only column
that displays the number of pins in each row.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2416
2022-02-07 17:45:16 +00:00
Kevin Lannen 08ca19f95d Eeschema: Display pin count and duplicate pin list in pin table dialog 2022-02-07 17:45:16 +00:00
Jeff Young 624dc393bf Fix tooltip.
Fixes https://gitlab.com/kicad/code/kicad/issues/10708
2022-02-07 17:36:40 +00:00
Jeff Young 79c7d55a40 Add a checkbox for LIB_SHAPE borders. (We already have them for LIB_TEXTBOXes.)
Fixes https://gitlab.com/kicad/code/kicad/issues/10365
2022-02-06 19:43:25 +00:00
Jeff Young 0ffa1288ee Regularize how penWidths are fetched.
Fixes https://gitlab.com/kicad/code/kicad/issues/git
2022-02-06 19:43:25 +00:00
Jeff Young aedfe08bad Show pin dangling symbols in Symbol Editor.
Even though we don't have connections they're a still a good visual
indication of which end of the pin is which.

Fixes https://gitlab.com/kicad/code/kicad/issues/10742
2022-02-06 19:43:25 +00:00
Jeff Young b1cc784582 Harmonize interchangeable units checkboxes.
Fixes https://gitlab.com/kicad/code/kicad/issues/10708
2022-02-06 19:43:25 +00:00
Jeff Young cc69849719 Fix definition of nonFields to include textboxes.
Fixes https://gitlab.com/kicad/code/kicad/issues/10771
2022-02-06 19:43:25 +00:00
Jeff Young b57ac3d517 Handle SCH_TEXTBOX in SCH_SEXPR_PLUGIN::Format.
Fixes https://gitlab.com/kicad/code/kicad/issues/10771
2022-02-06 19:43:25 +00:00
Marek Roszko d9c04da407 Sprinkle in some make_unique 2022-02-05 21:26:36 -05:00
Marek Roszko 41f54349a5 Replace inserts/push_backs with emplace in some spots 2022-02-05 19:53:31 -05:00
Jeff Young 7ccac79192 More wxString wide literals. 2022-02-05 21:29:34 +00:00
Jeff Young 8d3e1639d0 Update text variables when they change.
Fixes https://gitlab.com/kicad/code/kicad/issues/10734
2022-02-04 12:52:46 +00:00
Marek Roszko ca7840334c Mark some limits as constexpr
gcc doesn't need it and computes during compile regardless, but experimenting in godbolt, both clang and MSVC actually do need it or else it's partially computed at runtime
2022-02-04 07:50:13 -05:00
Seth Hillbrand 3badd53a96 Setup selection when repeating
We need the item to be currently selected when repeating the last symbol
insert.  This ensures we have a valid selection before starting the move
tool and possibly getting odd system behavior from mouse positions

Fixes https://gitlab.com/kicad/code/kicad/issues/10619

(cherry picked from commit 7642a9db79)
2022-02-03 17:09:59 -08:00
Jeff Young b9eb3e9b05 Be more explicit about string conversions. 2022-02-03 23:07:41 +00:00
Seth Hillbrand b7c31d3b5b When undoing creation of the sheet, get out first
We can't stay in a sheet that is deleted by the action of undo.  Checks
the current sheet and, if we are currently using it, ensures that the
following action is to leave the current sheet

Fixes https://gitlab.com/kicad/code/kicad/issues/10733

(cherry picked from commit ccf2a63f45)
2022-02-03 11:19:51 -08:00
Jeff Young 3d0b03515d Fix bad field names when ID == -1.
Fixes https://gitlab.com/kicad/code/kicad/issues/10548
2022-02-03 12:38:56 +00:00
Marek Roszko fa1d316d84 Fix windows build error 2022-02-02 17:43:47 -05:00
Wayne Stambaugh e590d07224 Fix clang build error. 2022-02-02 07:44:11 -05:00
Wayne Stambaugh 9260431fe4 Abstract out symbol library parser object. 2022-02-02 07:07:39 -05:00
Wayne Stambaugh 6fcc6f7c9d Factor out common legacy schematic and symbol library parser code. 2022-02-01 16:30:15 -05:00
Jeff Young bebfbce9b2 Move pcb file rep of text_boxes to strokes. 2022-02-01 16:29:59 +00:00
Jeff Young a1009d7899 Fix assertion failure for labels. 2022-02-01 12:01:04 +00:00
Seth Hillbrand 59e43527a0 Add dummy defaults for textbox 2022-01-31 16:26:37 -08:00
Jeff Young 4243d7b055 Bug fixes for color handling. 2022-02-01 00:21:08 +00:00
Seth Hillbrand 098e8f7d9b Revert "cmake: adding KICAD_MACOSX_APP_BUNDLE option"
This reverts commit ea9f960cc1.

Reverted for updates as this currently breaks kicad-mac-builder
2022-01-31 15:57:56 -08:00
Jeff Young f3cd36d1d7 Bring EEschema textboxes in line with PCBNew's.
Also adds Border checkboxes and fixes a bunch of bugs.
2022-01-31 21:46:40 +00:00
Jeff Young 5739505aa3 TextBoxes for PCBNew. 2022-01-31 20:00:47 +00:00
Jeff Young 60bcfd1bf1 Bug fixes in arc & textbox printing.
Also removal of the no-longer-used clipping code from GR*.
2022-01-31 20:00:47 +00:00
Roberto Fernandez Bautista 25a7de730c eeschema/CMakeLists.txt Sort sources alphabetically 2022-01-31 19:51:01 +00:00
jean-pierre charras 64f2adbc31 SCH_PAINTER, draw filled LIB_SHAPE: fix incorrect selection of fill color. 2022-01-30 10:20:49 +01:00
jean-pierre charras b4826ce304 LIB_TEXT: fix incorrect position of the drawn text.
Fixes #10654
https://gitlab.com/kicad/code/kicad/issues/10654
2022-01-30 09:11:16 +01:00
Seth Hillbrand 38706fdd95 Fully select a line for transformation
When not trying to select points, we need to ensure that the full
line is selected for transformation

Fixes https://gitlab.com/kicad/code/kicad/issues/10566

(cherry picked from commit 70d00689ca)
2022-01-29 17:37:30 -08:00
Wayne Stambaugh b36e31c49f Factor out common and remove dead legacy symbol library code. 2022-01-29 14:13:00 -05:00
Davide Gerhard ea9f960cc1 cmake: adding KICAD_MACOSX_APP_BUNDLE option
ADDED: with cmake KICAD_MACOSX_APP_BUNDLE option the user can disable
the macOS app bundle creation when compiling on macOS. This permit to
use/install KiCad like any other *nix platform (/usr/bin, /usr/share,
ecc.). By default, cmake build the app bundle.
2022-01-28 15:49:37 -08:00
Jeff Young c6a8100d46 Schematic and symbol text boxes.
Also fixes some plot bugs with arcs.

Also moves polygonization of arcs (when required) in plotting code
from 5 degrees to calculated based on ARC_HIGH_DEF.

Fixes https://gitlab.com/kicad/code/kicad/issues/5017
2022-01-28 21:38:15 +00:00
Jeff Young 3409783d9f Break sch_text.h/.cpp into sch_text and sch_label.
Also moves SCH_NETCLASS_FLAG to SCH_DIRECTIVE_LABEL, and remaps Altium
harnesses from SCH_TEXT to SCH_DIRECTIVE_LABEL.
2022-01-28 21:38:15 +00:00
Seth Hillbrand 79403ef075 Readd yield call to give slice to system.
Note:
- wxYield does not work here, indicating the need for locking
- wxYieldIfNeeded does not work, possibly for the same reason as wxYield
- Both Layout() and m_fieldGrid->Layout() need to be called even though
  the first should call the second.

Fixes https://gitlab.com/kicad/code/kicad/issues/5690
2022-01-28 13:02:39 -08:00
Franck a6203617d9 Fix Altium schematic port component import assertion.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10322

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10401
2022-01-28 15:52:30 +00:00
Mike Williams ecb32b1fb0 Eeschema: hover start from wire end should copy wire properties
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10128
2022-01-27 17:17:45 +00:00
Seth Hillbrand 9ab2eb391f Move delay selection out of UpdateUI
Calling actions from within UpdateUI can cause loops that crash or
substantially slow

Fixes https://gitlab.com/kicad/code/kicad/issues/10616
2022-01-26 16:05:40 -08:00
jean-pierre charras 8a17fb8d19 SCH_SEXPR_PARSER::parseArc(): fix a very annoying issue: each time the lib or
sch files are saved and reopened, 180 deg arcs were flipped.
This fix is a workaround, but avoid flipped arcs after saving/reopening these files.
2022-01-26 18:19:52 +01:00
Seth Hillbrand 2dc031ee34 Prevent auto-column sizing when editor opens
On GTK, some configurations will trigger a column resize, which will
close the current editor.  This blocks the column resize while the
editor is open, unless the resize continues, which indicates dragging of
the window edge

Fixes https://gitlab.com/kicad/code/kicad/issues/5690
2022-01-25 17:59:15 -08:00
Seth Hillbrand b6ecbc596e Fix mistaken use of `m_width`
This is a protected var in Linux but doesn't exist in Mac/MSW.  We use
the new m_fieldsSize
2022-01-25 12:45:09 -08:00
Seth Hillbrand efb323d57d Another stab at https://gitlab.com/kicad/code/kicad/-/issues/5690
This time, ensure that the grid is increased and the main form gets an
event
2022-01-24 16:30:30 -08:00
Seth Hillbrand a054a46136 Force a size event to avoid multiple yields
When the grid editor is shown, we also want to ensure that the grid gets
resized to account for the new editor.  Queuing the event will ensure
that happens after the editor is emplaced in the grid

Fixes https://gitlab.com/kicad/code/kicad/issues/5690

(cherry picked from commit fddfce4fb1)
2022-01-24 15:32:17 -08:00
Seth Hillbrand be5bb8c4bd Enforce strictly weak ordering in sheets
This ensures that irreflexivity is given in sort ordering.  This may
have been triggering issues in MacOS when adding sheets

Fixes https://gitlab.com/kicad/code/kicad/issues/10557

(cherry picked from commit a1615cce7e)
2022-01-24 10:41:21 -08:00
Seth Hillbrand 175c4fe67c Allow time to update editor
On GTK, the full editor needs to be shown and, for some systems, the
editor will not show correctly.  By yielding we should allow the time to
recalculate sizes for the editor in the grid

Fixes https://gitlab.com/kicad/code/kicad/issues/5690

(cherry picked from commit 871556ebda)
2022-01-24 09:58:10 -08:00
Seth Hillbrand 0926eb3287 Get all eeschema layers properly ordered
Layers not in the given order are drawn behind everyone else.  Missing
the text prevents global labels from showing properly in GAL order

Fixes https://gitlab.com/kicad/code/kicad/issues/10546

(cherry picked from commit f12d0cb0e2)
2022-01-23 10:04:32 -08:00
Fabien Corona 58e167013d SPICE: Add support for transmission lines 2022-01-23 17:23:22 +00:00
jean-pierre charras 2dbc89e5f2 DIALOG_SIM_SETTINGS: fix incorrect validation of DC souces in DC Transfer panel
Fixes #10568
https://gitlab.com/kicad/code/kicad/issues/10568
2022-01-23 16:22:12 +01:00
Jeff Young 0283e2c246 Highlighting for schematic shapes when fill shapes is turned off.
Fixes https://gitlab.com/kicad/code/kicad/issues/10372
2022-01-22 22:27:41 +00:00
Jeff Young 29841ba315 Bring ERC & DRC dialogs into parity.
Fixes https://gitlab.com/kicad/code/kicad/issues/9350
2022-01-22 22:27:41 +00:00
Jeff Young de49f5090d Formatting (and auto reduction). 2022-01-22 12:16:07 +00:00
Jeff Young 4665cdcdc5 Allow more (lots more) unfold from bus menu entries.
Fixes https://gitlab.com/kicad/code/kicad/issues/10529
2022-01-21 17:41:05 +00:00
jean-pierre charras 242e66355c SYMBOL_VIEWER_FRAME: fix refresh of the canvas after selecting a new symbol. 2022-01-21 16:37:58 +01:00
jean-pierre charras 694ae59664 fix a minor compil warning (shadowed vars) 2022-01-21 14:09:42 +01:00
Jeff Young c8a50d9b50 Remove unit-less angles from VECTOR2I/D APIs. 2022-01-20 23:58:20 +00:00
Seth Hillbrand 16aca901df Clear Undo list when renaming
Our undo/redo list is tied to the screen that gets cleared when we
reload the file after renaming.  We need to clear the Undo list at this
point to prevent possible crashes when moving too far back in the stack

Fixes https://gitlab.com/kicad/code/kicad/issues/10504

(cherry picked from commit 323a069738)
2022-01-20 11:29:05 -08:00
Seth Hillbrand cffc99e384 Don't close filled polylines when printing
Eeschema/libedit support open, filled polylines.  When printing, this
should be drawn as a fill, followed by the polyline to avoid assumptions
about closed polygons in the graphic code

Fixes https://gitlab.com/kicad/code/kicad/issues/10537

(cherry picked from commit 615eda816e)
2022-01-20 10:54:36 -08:00
Jeff Young 3ba89f50ef Maybe, just maybe, fix LibEdit arc parsing.
Fixes https://gitlab.com/kicad/code/kicad/issues/10455
2022-01-19 22:22:18 +00:00
Jeff Young 8445783216 Fix backwards arcs in legacy LIB_ARCs.
Fixes https://gitlab.com/kicad/code/kicad/issues/10455
2022-01-18 14:08:47 +00:00
jean-pierre charras 380cb452b2 fix an issue in a bom script (extra empty lines created)
Fixes #10473
https://gitlab.com/kicad/code/kicad/issues/10473
2022-01-18 13:49:50 +01:00
jean-pierre charras 25fca2abb7 fix a minor compil warning 2022-01-18 13:49:50 +01:00
Jeff Young f310a5b986 Excise deci-degrees from trigo. 2022-01-18 11:44:55 +00:00
Jeff Young b828355206 A bit more angle cleanup. 2022-01-18 09:48:24 +00:00
Jeff Young de31b813f3 Angle cleanup in the Cadstar importer. 2022-01-18 02:31:37 +00:00
Jeff Young 622f94e7b9 Angle cleanup in Altium importer. 2022-01-18 02:31:37 +00:00
Jeff Young 0218b782f4 Angle cleanup in Eagle importer. 2022-01-18 02:31:37 +00:00
Jeff Young dcaec78cc5 A bit more angle cleanup. 2022-01-18 02:18:55 +00:00
Thomas Pointhuber 0129e49b79 altium: Introduce new ALTIUM_COMPOUND_FILE object to handle file opening and searching for streams at a central place 2022-01-17 19:54:26 +01:00
Jeff Young 2defd8d911 Move show-bounding-boxes to a tool on the toolbars. 2022-01-17 11:56:40 +00:00
Jeff Young 5cc3368b14 Fix bounding boxes and hittesting for arcs in eeschema. 2022-01-16 23:54:59 +00:00
Jeff Young e61144d45a Finish with EDA_ANGLE. 2022-01-16 21:15:40 +00:00
dsa-t bc1ff6756f Cross-probing/selection for multiple items (SCH->PCB) 2022-01-16 20:29:03 +00:00
Jeff Young e84c574830 Some more EDA_ANGLE cleanup. 2022-01-16 19:16:18 +00:00
jean-pierre charras 516d038bdf Eeschema: fix incorrect stored rotation value in file of the global and hierarch. labels.
The stored value was the rotation of the text (always 0 or 90 deg), but these labels can also
be rotated by -90 or 180 deg
Fixes #10450
https://gitlab.com/kicad/code/kicad/issues/10450
Fixes #10457
https://gitlab.com/kicad/code/kicad/issues/10457
2022-01-16 17:19:36 +01:00
Jeff Young 9b661aea10 EDA_ANGLE for plotters.
Also fixes a compile error in the PNS Playground.
2022-01-16 01:19:45 +00:00
Jeff Young 2b14b60c32 Resolve text variables in eeschema before passing to pcbnew.
Fixes https://gitlab.com/kicad/code/kicad/issues/10429
2022-01-15 01:30:03 +00:00
Jeff Young a533d64417 Apply default line style.
Fixes https://gitlab.com/kicad/code/kicad/issues/10388
2022-01-14 16:08:19 +00:00
Jeff Young 07013d00e1 More EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young 1b19ff5f42 More EDA_ANGLE changes. 2022-01-14 16:08:19 +00:00
Jeff Young 70ad554343 Coverity fixes. 2022-01-14 16:08:18 +00:00
Jeff Young e048e51f5d Improve SNR of EDA_ANGLE stuff. 2022-01-14 16:08:18 +00:00
jean-pierre charras d0f2c20235 Define our kicad font name only once, and do not translate it.
Especially using a translated name breaks kicad config and files because
in non English languages both translated and not translated names were used in code.
2022-01-13 14:32:55 +01:00
Seth Hillbrand e244ce1431 Fix cherry-picked wxPoint 2022-01-12 15:49:03 -08:00
Seth Hillbrand d3f24308e6 Handle rotated symbol rectangles in Eagle import
Fixes https://gitlab.com/kicad/code/kicad/issues/10360

(cherry picked from commit dcb8f29317)
2022-01-12 15:11:18 -08:00
dana 8373180cbb Handle Unicode clipboard data in pcbnew and symbol editor
Fixes #10323
2022-01-12 17:15:47 +00:00
Seth Hillbrand 5a3d53d9e4 Catch default autowire case
Since we are dereferencing the optional, we need to ensure it exists in
all cases

Fixes https://gitlab.com/kicad/code/kicad/issues/10394

(cherry picked from commit 56d87a8613)
2022-01-12 09:03:44 -08:00