Commit Graph

30658 Commits

Author SHA1 Message Date
Seth Hillbrand 69469b254a Printing multiple bitmaps
A long-standing issue with multiple workarounds
(https://gitlab.com/kicad/code/kicad/-/issues/1877) prevented eeschema
printouts with multiple images or images in both the worksheet and the
schematic.

We worked around this by ordering the bitmap printing to be the first
step in the printing process.  This partially worked but didn't get
everything correct.  The primary difficulty in debugging this was that
the wxPrintPreview that we generate looked correct.  Only the actual
printout was incorrect.

The fix is to explicitly clip bitmap drawing to the bitmap area,
regardless of how large the bitmap is.
2022-01-07 17:15:59 -08:00
Seth Hillbrand bfca928900 Plot pads in layer color
v6 pads are not allowed to be a different color from the rest of the
copper layer, so don't query the GAL layer for a color

Fixes https://gitlab.com/kicad/code/kicad/issues/10293
2022-01-07 08:55:59 -08:00
Seth Hillbrand 62f8603353 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
2022-01-07 08:25:09 -08:00
Seth Hillbrand 9a2332dfcf 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
2022-01-07 08:23:31 -08:00
qu1ck 4bcfa8df1f Template for vector<VECTOR2I> in swig 2022-01-06 23:48:52 -05:00
Seth Hillbrand a0e424c2ac Forgot to build ninja files 2022-01-06 20:09:44 -08:00
Seth Hillbrand f4b9a92b94 Swap make for ninja in Fedora CI
Take advantage of extra cores on hetzner machine
2022-01-06 20:09:44 -08:00
Seth Hillbrand 184a592f82 Use KiCad builders for Fedora 2022-01-06 20:09:44 -08:00
Seth Hillbrand 3e6bf7814b Safely sort view layers
Changing view order of only some layers can cause overwriting of the
original layer if not pre-staged

Fixes https://gitlab.com/kicad/code/kicad/issues/10283
2022-01-06 14:41:10 -08:00
Seth Hillbrand 9864337914 Do not call SafeYield on close
wxSafeYield() is not "safe".  Pending actions may include deletion of
the currently active class.  This will cause crashes when exiting.  If
needed for specific behaviors, we should use wxSafeYieldFor( flag ) with
the appropriate events specified rather than a general yield which can
cause more problems
2022-01-06 12:31:59 -08:00
Seth Hillbrand 78e737b9d8 DRC scripting: load project from board if possible
s_SettingsManager is not always initialized when the WriteDRCReport is
run.  We should first attempt to extract the project from the actual
board being checked.  Failing that, we fall back to the static settings manager and then exit if we don't have a project associated.

Fixes https://gitlab.com/kicad/code/kicad/issues/10221
2022-01-06 11:50:21 -08:00
Brian Mayton d014f0307b Add ORANGE to DXF output
Matches the schematic color options to DXF layers

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

Signed-off-by: Seth Hillbrand <seth@kipro-pcb.com>
2022-01-06 11:02:57 -08:00
Seth Hillbrand 7c9340f855 Fix swap interval checking
Checking for the existence of the call only validated that our header
defined the value, not that the video card/driver supported the call.
We query the extensions string directly to check for support.  This
should fix both the X11 and virtualization issues (potentially other
crashes with older video cards as well)

Fixes https://gitlab.com/kicad/code/kicad/issues/8944
2022-01-06 10:53:13 -08:00
jean-pierre charras 3069b198b1 PANEL_TEMPLATE_FIELDNAMES: fix incorrect management of boolean options
(it was impossible to disable them)
From Master branch.
Fixes https://gitlab.com/kicad/code/kicad/issues/10280
2022-01-06 19:44:23 +01:00
Seth Hillbrand 05d3dc533b Prevent cvpcb from losing text focus on filter
Refresh event changes focus (on GTK).  We fix this by storing the
existing insertion point in the text box, refocusing and restoring the
text position

Fixes https://gitlab.com/kicad/code/kicad/issues/10029
2022-01-06 09:16:34 -08:00
Marek Roszko 1e05732f55 Add std::hash specialization for VECTOR2I
(cherry picked from commit 589a03afcd)

Fixes https://gitlab.com/kicad/code/kicad/issues/10275
2022-01-05 20:32:46 -08:00
Seth Hillbrand 71e7b4b77b 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
2022-01-05 17:18:39 -08:00
Seth Hillbrand b8a7a66a0a 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
2022-01-05 16:51:41 -08:00
Seth Hillbrand 55087a9e82 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
2022-01-05 16:02:50 -08:00
Seth Hillbrand 444801ada6 Prevent unneeded fallback
Starting in be8327bd54, we assume that all
exceptions in DoRePaint() are caused by OpenGL.  But many calls in
UpdateItems() will throw if there are internal errors such as
std::out_of_range.  Here, we catch those errors and simply skip ahead
rather than falling back to Cairo
2022-01-05 13:46:15 -08:00
Steffen Mauch 7afe188a29 eeschema: automatic generated symbol library from EAGLE plugin does not include footprint reference
Fixes https://gitlab.com/kicad/code/kicad/issues/10262

(cherry picked from commit 3ced3afa68)
2022-01-05 15:28:05 -05:00
Ian McInerney 1ad1cf8374 Fix compile error with UTF8 unicode wxWidgets build
Fixes https://gitlab.com/kicad/code/kicad/issues/10210

(Cherry-picked from bd828f598c)
2022-01-05 19:45:27 +00:00
Ian McInerney abaee94109 Revert caf406943e and don't install the kicad2step lib
This fixes https://gitlab.com/kicad/code/kicad/-/issues/9944 and reverts
caf406943e. The original fix caused issues
with some CMake versions because it tried to give library dependencies
to an object library, which can't have any library dependencies.
Instead, we need it as a static library, and since there is no need to
actually have it as an end-user library, it shouldn't be in the install
command.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9944

(Cherry-picked from commit fb36e1b582)
2022-01-05 19:45:27 +00:00
Steffen Mauch d60e77176f eeschema: EAGLE plugin does not reference footprint with library suffix
Fixes https://gitlab.com/kicad/code/kicad/issues/10261

(cherry picked from commit 502e34349e)
2022-01-05 14:39:43 -05:00
Seth Hillbrand 7f1648934f 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
2022-01-05 11:33:03 -08:00
Seth Hillbrand bef762e652 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
2022-01-05 11:07:23 -08:00
Seth Hillbrand a05ec04ee8 Set readable flags correctly on open
Missing files may be thrown during open.  These should have existence
and readable flags set correctly
2022-01-05 09:54:10 -08:00
Steffen Mauch 362eedc510 pcbnew: EAGLE plugin is case sensitive to >VALUE / >NAME
Fixes https://gitlab.com/kicad/code/kicad/issues/10253

(cherry picked from commit 82f147ecef)
2022-01-05 08:07:41 -05:00
Steffen Mauch 11402e2db1 pcbnew: fixing eagle_plugin with empty class names
Fixes #10229
https://gitlab.com/kicad/code/kicad/issues/10229

(cherry picked from commit a5307c6f59)
2022-01-05 07:22:01 -05:00
Seth Hillbrand b1658fdf9a 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
2022-01-04 20:27:43 -08:00
Jon Evans f9d8ec6137 Handle footprint shapes in polygon creation
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10259
2022-01-04 21:31:22 -05:00
Jon Evans e9b91b6fab Fix creating polygons from footprint rule areas
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10257
2022-01-04 21:28:04 -05:00
Seth Hillbrand 873353d8d7 Prevent clipping by default
The text bbox inflation from fb4343bc clips dimensions by default.  This
restores the default size to not clip the dimension line.  It is still a
bit larger than I'd like it to be but is usable

Fixes https://gitlab.com/kicad/code/kicad/issues/10033
2022-01-04 12:11:23 -08:00
Seth Hillbrand a326d777f0 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
2022-01-04 19:08:12 +00:00
Thomas Pointhuber dec310f7f8 altium: Fix board outline import with arcs using SHAPE_LINE_CHAIN instead of a hack 2022-01-04 19:57:26 +01:00
Seth Hillbrand ca8cf14dff Fix missing FOOTPRINT cast in swig
Fixes https://gitlab.com/kicad/code/kicad/issues/10236
2022-01-04 10:49:29 -08:00
Seth Hillbrand ed9a3deb57 Fix pad snapping in renumber pads
Snap shouldn't be looking for other items in this routine or using the
grid

Fixes https://gitlab.com/kicad/code/kicad/issues/10238
2022-01-03 17:18:03 -08:00
Wayne Stambaugh 58b07efd99 Make footprint and symbol editors use MRU path for new libraries.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10216

(cherry picked from commit ff38853886)
2022-01-03 18:36:46 -05:00
Seth Hillbrand 1874ad2f7e Catch errors from `load()`
Loading footprints may throw in some cases.  We need to catch these
nicely without breaking out of the full loading process

Fixes https://gitlab.com/kicad/code/kicad/issues/10213
2022-01-03 15:30:20 -08:00
Marco Ciampa b115aec42b Updated Italian translation 2022-01-03 12:02:20 +01:00
Roberto Fernandez Bautista 5e884d14c7 Rename ComparePageNumAndName -> ComparePageNum 2022-01-02 23:27:15 +00:00
Mike Williams e36381bdd2 Gerbview: Fix diff mode issues with OpenGL transparency
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10121
(cherry picked from commit 404659d275)
2022-01-02 18:18:00 -05:00
Jon Evans 45182febaf Exit router and invoke edit tool when attempting to drag an arc track
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10208
2022-01-02 16:10:26 -05:00
Jon Evans ea99c42df6 Move duplicate field handling into field parser
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10130
2022-01-02 13:19:31 -05:00
Jon Evans 0065036899 Load local settings even when not setting project active
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10179
2022-01-02 12:40:25 -05:00
Jon Evans bb388d47fc Fix undo/redo sample action plugin for latest API
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10212
2022-01-02 12:26:27 -05:00
Jon Evans 134b09004b Fix highlighting color logic when net colors are active
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10157
2022-01-02 12:11:24 -05:00
Jon Evans c52421869a Fix saving of existing appearance presets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10166
2022-01-02 11:59:19 -05:00
Seth Hillbrand addc5574b4 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
2022-01-01 16:53:31 -08:00
Seth Hillbrand bd75cffff3 Prevent ops on empty selection
Fixes https://gitlab.com/kicad/code/kicad/issues/10164
2022-01-01 15:28:47 -08:00