Commit Graph

7844 Commits

Author SHA1 Message Date
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
jean-pierre charras a709d97a32 SCH_LABEL_BASE::Plot(): Plot fields. 2022-01-12 11:08:34 +01:00
jean-pierre charras b3072cc16b SCH_PAINTER, DrawLine: gives a minimal length to lines having a 0 length
Lines with start point = end point always create problems in OpenGL (not drawn).
2022-01-12 09:44:30 +01:00
Franck Bourdonnec 3d8288f919 Remove unused vars, verified there was no other intention with them;
rectangle are OK
2022-01-11 20:16:35 +00:00
Jeff Young 062f5e3177 Undo for SCH_SHAPEs.
Fixes https://gitlab.com/kicad/code/kicad/issues/10373
2022-01-11 18:33:54 +00:00
Jeff Young a23f6e4e92 Handle border colors for SCH_SHAPEs.
Fixes https://gitlab.com/kicad/code/kicad/issues/10361
2022-01-11 18:18:11 +00:00
Jeff Young 184bcf6520 Fix failure of SCH_SHAPE to pick up default line width.
Fixes https://gitlab.com/kicad/code/kicad/issues/10376
2022-01-11 17:40:49 +00:00
Jeff Young f9927ab675 Fix Text Properties dialog layout.
Fixes https://gitlab.com/kicad/code/kicad/issues/10368
2022-01-11 16:00:38 +00:00
Jeff Young 267eca28cd Font support for global edit text & graphics dialogs. 2022-01-11 15:34:24 +00:00
Jeff Young 8f7d2dd06a More VECTOR2D -> VECTOR2I and wxPoint cleanup. 2022-01-11 14:20:14 +00:00
Seth Hillbrand d5faac7614 Better fix for missing end segment
Rather than skipping our endEdit() call in libedit, we need to
parameterize whether we want the shape open/closed.  Closed will remove
the last segment if it lands on the first point.  We don't want that
but we do want to remove the last point if it duplicates the second to
last (in the case of double-clicking)

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

(cherry picked from commit 55020c2b89)
2022-01-10 13:39:39 -08:00
Jeff Young 7d032f9c2f Outline font rendering for Cairo, plotter, printer and 3D viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/10319
2022-01-10 01:54:28 +00:00
Jeff Young 76368af7b9 Font cleanup and bug fixes. 2022-01-09 18:33:53 +00:00
Jeff Young 92d5a3e763 Clear caches when changing global default font. 2022-01-09 11:34:20 +00:00
Jeff Young 27c967421c Commenting and "auto" reduction. 2022-01-08 16:47:45 +00:00
Jeff Young 04c76f10e9 Performance enhancements for fonts. 2022-01-08 16:47:45 +00:00
Jeff Young 438c63f587 Fix outline font boundingbox issues. 2022-01-08 16:47:45 +00:00
Jeff Young aef2a3fca4 Default font for eeschema. 2022-01-08 16:47:45 +00:00
Jeff Young a2030a5956 GUI for font selection. 2022-01-08 16:47:45 +00:00
Ola Rinta-Koski 72b69e8d7f File format changes for fonts. 2022-01-08 16:47:45 +00:00
Seth Hillbrand 04c46a8fd2 Correct return type in mapCoords 2022-01-07 09:08:40 -08:00
Seth Hillbrand 3d88f37949 Switch mapCoords to VECTOR2I 2022-01-07 08:37:37 -08:00
Seth Hillbrand eb271ca7fb Don't deduplicate schematic polygon points 2022-01-07 08:29:34 -08:00
Seth Hillbrand 4cdc9d3857 Don't deduplicate symbol polygons
SHAPE_LINE_CHAIN will, by default, remove duplicate points when
appending.  We don't want to do this when constructing our polygons in
symbol editor, so we need to explicitly call the routine without
deduplication

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

(cherry picked from commit 62f8603353)
2022-01-07 08:25:49 -08:00
Seth Hillbrand c9fc15b5eb Clear edited point when exiting tool
When leaving the main point editor loop, we need to ensure that the edit
point is cleared as well.  This is usually cleared by a ClearEvent call
but in case this is missed, we need to ensure that other tools are not
caught out

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

(cherry picked from commit 9a2332dfcf)
2022-01-07 08:25:49 -08:00
jean-pierre charras e00e9ff41f PANEL_TEMPLATE_FIELDNAMES: fix incorrect management of boolean options
(it was impossible to disable them)
Fixes #10280
https://gitlab.com/kicad/code/kicad/issues/10280
2022-01-06 19:00:52 +01:00
Seth Hillbrand 3ace4446e7 Use 'special' escaping for certain fields
Most fields are escaped using the `\` notation.  But the VALUE field and
the symbol name need to be escaped using braces notation.

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

(cherry picked from commit 71e7b4b77b)
2022-01-05 17:19:36 -08:00
Seth Hillbrand 88a8ad2ca1 Keep symbol synced with edit tool
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)
2022-01-05 16:52:02 -08:00
Seth Hillbrand 5a8b0921eb Don't remove last point in libedit
SHAPE_LINE_CHAIN in libedit doesn't make a polygon, so we always need
the last point and it shouldn't be closed

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

(cherry picked from commit 55087a9e82)
2022-01-05 16:06:38 -08:00
Steffen Mauch 3ced3afa68 eeschema: automatic generated symbol library from EAGLE plugin does not include footprint reference
Fixes https://gitlab.com/kicad/code/kicad/issues/10262
2022-01-05 19:48:40 +00:00
Seth Hillbrand e4961cb956 Update pin cache when undoing
The pin cache is invalidated by swap, so we need to ensure that it is
reset when we undo a change to the pins in schematic editor

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

(cherry picked from commit 7f1648934f)
2022-01-05 11:33:35 -08:00
Steffen Mauch 502e34349e eeschema: EAGLE plugin does not reference footprint with library suffix
Fixes https://gitlab.com/kicad/code/kicad/issues/10261
2022-01-05 19:14:27 +00:00
Seth Hillbrand 30549a5e6a Don't strip extensions twice in BOM export
Exporting the Bill of Materials uses the netlist exporter.  Both of
these routines were stripping the extension, leading to projects like
"test.project.kicad_pro" having the project name stripped.  We separate
the BOM netlist export from generic plugin netlist export to allow the
correct behavior when exporting netlists and generating BOMs

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

(cherry picked from commit bef762e652)
2022-01-05 11:07:49 -08:00
Seth Hillbrand 9ca41cc8ee Set readable flags correctly on open
Missing files may be thrown during open.  These should have existence
and readable flags set correctly

(cherry picked from commit a05ec04ee8)
2022-01-05 09:55:51 -08:00
jean-pierre charras cd0ac9e698 eeschema, DIALOG_FIELD_PROPERTIES: fix a few issues.
(incorrect handling of H and V justify bitmap buttons
Fixes #10267
https://gitlab.com/kicad/code/kicad/issues/10267
2022-01-05 17:25:18 +01:00
Seth Hillbrand b0fddef9b4 Don't rename existing schematic file
We should never leave a situation where the schematic file may no longer
exist (if the first rename succeeds and the second fails).  So, make a
backup copy of the original schematic file and then attempt to rename
the autosave over the first file.  In this case, if either attempt
fails, we do not lose the original file

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

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

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

(cherry picked from commit b1658fdf9a)
2022-01-04 20:28:21 -08:00
Marek Roszko 726d873c53 Tear down the wxPoint trigo helpers 2022-01-04 21:23:11 -05:00
Seth Hillbrand dda569d486 Don't split legacy paths
The '.' is a valid character in the legacy preferences, not a separator.
Also adds fail-safe catch for JSON throws

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

(cherry picked from commit a326d777f0)
2022-01-04 11:09:40 -08:00
jean-pierre charras c2b54faceb CvPcb: fix crash due to a null pointer: pcbconfig() can return null.
CvPcb has no config option and pcbconfig() returns nullptr.
In this case use default settings.
Fixes #10250
https://gitlab.com/kicad/code/kicad/issues/10250
2022-01-04 14:51:32 +01:00
Marek Roszko ac715d2e51 Scoop up some more wxPoint instances 2022-01-03 20:00:53 -05:00
Jeff Young e21fa31f64 Rip out rest of macHack architecture. 2022-01-03 22:09:56 +00:00
Roberto Fernandez Bautista 2d3624a016 Rename ComparePageNumAndName -> ComparePageNum 2022-01-02 23:20:17 +00:00
Jon Evans 9daa4d0e2c Move duplicate field handling into field parser
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10130

(cherry picked from commit ea99c42df6)
2022-01-02 13:19:54 -05:00
Jeff Young 89c0f8e297 Move to new font engine. 2022-01-02 14:57:03 +00:00
jean-pierre charras c108d25897 Fix mirroring tests issues in qa tests for eeschema 2022-01-02 15:44:52 +01:00
jean-pierre charras e6087f361a Add forgotten fix 2022-01-02 15:08:09 +01:00
jean-pierre charras 797de9d327 Fix some issues (but not all) in qa tests for eeschema
The main fix is for errors in SCH_TEXT and derived:
qa test expects 4 rotations is an identity transform:
This is false if the item has autoplaced fields.
The fix clears autoplaced flags.
2022-01-02 14:54:27 +01:00
Simon Richter d25fe17b28 Bump minimum required CMake version to 3.11
Signed-off-by: Marek Roszko <mark.roszko@gmail.com>
2022-01-01 21:35:08 -05:00
Seth Hillbrand a365afde3c Ensure merged line gets selected if either parent is
We were only checking for the selection of a single line that gets
merged.  This prevents the merged line from being highlighted but not
selected after merging

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

(cherry picked from commit addc5574b4)
2022-01-01 16:53:52 -08:00
Jeff Young 93018375f8 Fix some test errors and update gold files for better netnames. 2022-01-01 20:46:45 +00:00
Jeff Young 32dec0127e Fix some issues with Eeschema's Shape Properties dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/10140
2022-01-01 20:46:45 +00:00