Commit Graph

7105 Commits

Author SHA1 Message Date
Roberto Fernandez Bautista b7f8f95725 Don't lock OpenGL context twice
Use GAL_DRAWING_CONTEXT as this unlocks the context in its destructor,
so that when an exception is thrown inside the `try` block, it should
automatically unlock before we switch backend.

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

(cherry picked from commit 1b6fe615e5)
2022-02-13 21:10:48 +00:00
Jeff Young fd4ac7c5df Error messages for zone merging.
Also fixes a bug where zones meeting at a point would get merged
resulting in a self-intersecting zone.

Also fixes a bug where undo would not be handled correctly when zones
could not be merged.

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

(cherry picked from commit d5a2059c21)
2022-02-13 18:30:32 +00:00
jean-pierre charras 6b6d97e726 Gerbview: fix a long standing issue: negative objects are now correctly printed. 2022-02-12 11:57:14 +01:00
Seth Hillbrand 1b8f25235c There is one source of truth in AC
Don't store default values in two separate places.  Passes the existing
by value as the default.

Issue identified by @axemagn

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

(cherry picked from commit 3b87ab630e)
2022-02-11 13:24:31 -08:00
Seth Hillbrand 861589d837 Use wxEmptyString instead of wxT( "" )
Also fixes places where ternaries did autopromotion instead of returning
an empty wxString
2022-02-09 10:33:52 -08:00
Marek Roszko e72bd34383 Fix color4d distance return type
(cherry picked from commit 1f8d101b1d)
2022-02-07 02:11:55 +00:00
Seth Hillbrand e18fc36646 wxT rework for common directory 2022-02-04 16:24:50 -08:00
jean-pierre charras 57cbe261f2 WX_GRID: highlight the selected cell after selection by tab or arrow keys.
Fixes #9290
https://gitlab.com/kicad/code/kicad/issues/9290
2022-02-04 13:55:00 +01:00
Marek Roszko 50d3a507d0 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


(cherry picked from commit ca7840334c)
2022-02-04 12:50:54 +00:00
Jeff Young 527e06d989 Fix some overly-large text spacing.
While overly-large bounding boxes mostly don't matter, they make us
knock out holes in zones that are too large.
2022-02-04 00:34:20 +00:00
Jeff Young d6a86fa9e0 Don't double-count the text thickness in its polygon shape.
The stroke font already takes the thickness into account in
ComputeStringBoundaryLimits() (which is called by GetTextBox()).
2022-02-04 00:34:20 +00:00
Seth Hillbrand 7601a3385f Convert strings to wide when using wxString routines
WxString does not allocate space for wide strings needed during
conversion unless the string is explicitly wide.  This can cause buffer
over/underflow

Fixes https://gitlab.com/kicad/code/kicad/issues/10605
2022-02-03 13:08:07 -08:00
Jeff Young 5c94d59e75 Use natural order sorting for FP libraries.
Fixes https://gitlab.com/kicad/code/kicad/issues/10349

(cherry picked from commit a187076438)
2022-02-03 15:01:04 +00:00
Scott Candey 02f93805d0 Common: Corrects Mac OS text navigation shortcuts in Scintilla
Ctrl-A moves cursor to beginning of current line in text box.
Ctrl-E moves cursor to the end of the line.
This change makes navigation in Scintilla text boxes consistent
with other text boxes in KiCad.

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

(cherry picked from commit 23fdbe4b21)
2022-02-03 15:01:04 +00:00
Jeff Young 2e324aa845 Promote to cell selection for spreadsheet-style paste.
Fixes https://gitlab.com/kicad/code/kicad/issues/9211

(cherry picked from commit 9de62d1dd4)
2022-02-03 15:01:04 +00:00
Jeff Young 2425444947 Map zone layers before checking their visibility.
Fixes https://gitlab.com/kicad/code/kicad/issues/10509

(cherry picked from commit 09d0f6e17c)
2022-02-03 15:00:39 +00:00
Jeff Young c805144c08 Support (and save/recall) zoom in/out in Custom Rules editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/5796

(cherry picked from commit 0036f44e37)
2022-02-03 15:00:39 +00:00
jean-pierre charras 788c607d47 EDA_SHAPE::MakeEffectiveShapes(): protect against empty polygons.
Fixes #10713
https://gitlab.com/kicad/code/kicad/issues/10713
2022-02-02 20:48:42 +01:00
Alex 73d0d7796c Allow overlay scrolling on GTK, except for GAL canvases.
This prevents glitches when both scrollbars
are visible and scrolling to the end.

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

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

(cherry picked from commit 4c4089e836)
2022-01-31 15:43:31 -05:00
Seth Hillbrand 8753051db6 Don't count zero-length as duplicate
We were checking for duplicate tracks by looking to see if the two
tracks had two shared points.  A null track always matched this case,
which removed the valid track.  We solve this by avoiding null tracks in
the duplicate checker.  They are removed separately in the null track
stage.

This also fixes a GTK-specific tree issue where we require the
BeforeReset()/AfterReset() calls instead of Cleared() to prevent GTK
from dereferencing a parent after freeing

Fixes https://gitlab.com/kicad/code/kicad/issues/10624
2022-01-28 16:34:00 -08:00
Wayne Stambaugh ca27b38182 Fix broken environment variable substitution on Windows.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10303

(cherry picked from commit 9af365b5b3)
2022-01-27 08:56:46 -05:00
Marek Roszko 1a534ade89 Remove UpdateUI from preferences pdf viewer option
Partial fix for https://gitlab.com/kicad/code/kicad/-/issues/10590
2022-01-24 20:36:21 -05:00
Wayne Stambaugh ab184ba9f3 Fix wxWidgets invalid string specifier assertion. 2022-01-24 15:44:42 -05:00
Marek Roszko e0b835fe20 Set curl to use the Windows cert store
(cherry picked from commit 3ede5f42be)
2022-01-22 03:10:11 +00:00
Jeff Young 0317185860 Don't update units for UNSCALED, PERCENT or DEGREES.
Fixes https://gitlab.com/kicad/code/kicad/issues/10020

(cherry picked from commit 27d8df1122)
2022-01-21 15:42:48 +00:00
Seth Hillbrand dd7029ea07 Always use the project directory for default save
Fixes https://gitlab.com/kicad/code/kicad/issues/10478
2022-01-20 11:51:16 -08:00
Seth Hillbrand 6810479a19 Prevent UI updates from changing zoom selection
The zoom selection should only change when requested by the user, not in
response to UI updates.  This can cause unexpected zoom shifts when the
calculated zoom is within a range of one of the presets.  It also adds
unneeded calls during the UI update cycle

Fixes https://gitlab.com/kicad/code/kicad/issues/10498
2022-01-20 10:09:25 -08:00
jean-pierre charras d9c6765be7 ITMAP_BASE::DrawBitmap(): fix position of the clipping area when using matrix transform.
Fixes #10525
https://gitlab.com/kicad/code/kicad/issues/10525
From Master branch
2022-01-20 16:27:18 +01:00
jean-pierre charras 24865971af DRAWING_SHEET_PARSER: fix missing parse of "T_comment" case for DS_DATA_ITEM_BITMAP.
Fixes #10477
https://gitlab.com/kicad/code/kicad/issues/10477
From Master.
2022-01-17 18:04:26 +01:00
jean-pierre charras 10ce515aca LSET::SeqStackupBottom2Top(): add missing user layers to list of layers
These missing layers were not exported in export SVG.
From master branch
2022-01-17 11:01:11 +01:00
Seth Hillbrand cccdac136f Fix transparent circle printing
DrawEllipse seems to work fine using transparent bg for all DCs except
printing (which is the only one we use now)  Use two arcs to draw a
transparent fill for the circle instead as a workaround until we
implement Cairo printing

Fixes https://gitlab.com/kicad/code/kicad/issues/10431
2022-01-14 16:13:05 -08:00
dana 57d58fe335 Handle Unicode clipboard data in pcbnew and symbol editor
Fixes #10323

(cherry picked from commit 8373180cbb)
2022-01-12 09:23:24 -08:00
Seth Hillbrand 55020c2b89 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
2022-01-10 13:37:47 -08:00
Mikolaj Wielgus a91f807e13 Update contributor name 2022-01-09 09:29:54 +01:00
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
qu1ck 4bcfa8df1f Template for vector<VECTOR2I> in swig 2022-01-06 23:48:52 -05: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
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 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
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
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 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
Mikolaj Wielgus d913e6a8f7 Restore Translators-Other section in credits 2021-12-24 20:36:10 +01:00
Jeff Young e7cc177d94 Allow a 0 pin-symbol-size.
This is particularly important when reading legacy projects as 0 is
what signals the painter to use the old algorithm (1/2 pin name/number
size).

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

(cherry picked from commit f089cf44a7)
2021-12-23 17:01:48 +00:00
Jeff Young ad583eab13 Add hot-updating of units in common wxGrids.
Fixes https://gitlab.com/kicad/code/kicad/issues/10020

(cherry picked from commit 6e2460ad37)
2021-12-23 17:01:34 +00:00
Mikolaj Wielgus 2ecd5ac909 Fix calculation of selection center
Fixes https://gitlab.com/kicad/code/kicad/issues/9998
2021-12-16 08:13:52 +01:00
Seth Hillbrand 9e6538b9a0 Revert accidental tilde change
Our baseline script to generate the font seems to shift the tilde down
by half a cell.  Unclear why but we shouldn't be changing the position
between versions.

Reference https://gitlab.com/kicad/code/kicad/-/issues/4396
2021-12-15 19:28:12 -08:00
Seth Hillbrand d785a97940 Add Donate button to About dialog. 2021-12-15 10:02:01 -08:00
Seth Hillbrand 7f419e4468 Update translators 2021-12-14 13:01:10 -08:00