Commit Graph

7124 Commits

Author SHA1 Message Date
Jon Evans 9c386026a8 Use actual project path when saving project
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10540
2022-03-10 09:08:20 -05:00
Marek Roszko c465a6ebc7 Add some more reserves for string funcs
(cherry picked from commit 2df80c6473)
2022-03-09 16:45:28 +00:00
Marek Roszko 4e5038eb3e Try and reduce memory allocs when (un)escaping strings
(cherry picked from commit ca5049b6bc)
2022-03-09 16:45:02 +00:00
Jeff Young 5e0251c2ba Natural sorting for nets.
Fixes https://gitlab.com/kicad/code/kicad/issues/10534

(cherry picked from commit 96f9ea286e)
2022-03-09 14:37:46 +00:00
Seth Hillbrand 0cf1a67e29 Cache read arc data for stability
Arcs can be altered by the process of changing from on-disk
representation to in-memory representation.  Saving back to disk without
modifying the arc should not modify the calculated values.

This stores a copy of the on-disk representation that is only used to
save back to disk in the event that the arc is not modified during
editing.

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

(cherry picked from commit cd7141fd10)
2022-03-08 10:33:49 -08:00
Jon Evans 1394509734 Settings: allow multiple project access from Python standalone
We can't handle this in the UI, but we can externally, so allow
it for Python scripting and eventually we'll use this in the UI
also...

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10540
2022-03-05 12:50:45 -05:00
jean-pierre charras e5a85b107f Gerber plotter: fix broken plot of SHAPE_LINE_CHAIN with arcs.
Also simplify SHAPE_T::POLY plot.
From Master branch.
2022-02-28 18:26:26 +01:00
Jeff Young 6341548939 Infobar warning if symbol loading was cancelled.
Also makes sure the progress dialog is closed when we're done reading
symbols (it used to stay up for much of the symbol editor initialization).

Also makes sure that any cancel in the preLoad step is honoured in the
sync step.  (The preload is done because it is multi-threaded and therefore
faster than the single-threaded sync.)

Also makes sure that individual threads pay attention to the cancellation,
not just the GUI thread.

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

(cherry picked from commit 1f16092e29)
2022-02-27 18:20:25 +00:00
Jeff Young 9c2bc98fd3 On-the-fly translations for Grid and Zoom menus.
Fixes https://gitlab.com/kicad/code/kicad/issues/10961

(cherry picked from commit 107067ad05)
2022-02-25 22:02:51 +00:00
Seth Hillbrand d29d981784 Avoid overflow in textbox
Count() returns unsigned values.  Since, we subtract 1 from this value,
if the count is 0, we will underflow the unsigned value, creating an
extremely large value that we multiply by the interline spacing.
2022-02-25 11:11:29 -08:00
Jeff Young 6036331b25 Debounce layer visibility buttons and fix issues with FP Editor.
(cherry picked from commit cb16ad7557)
2022-02-25 10:40:05 +00:00
Seth Hillbrand de48f41184 Fix wxT commit
Fixes https://gitlab.com/kicad/code/kicad/issues/10967
2022-02-24 17:00:10 -08:00
aris-kimi 8ce9f08268 Update year
Fixes https://gitlab.com/kicad/code/kicad/issues/10842
2022-02-21 22:21:31 +00:00
Marek Roszko 8ad0f24031 Simplify locale data path setting... 2022-02-21 13:13:37 -05:00
Marek Roszko b2ac4b2c65 Simplify KICAD6_TEMPLATE_DIR default
The search_stack method is bugland

Fix https://gitlab.com/kicad/code/kicad/-/issues/10119


(cherry picked from commit ad251b7b8c)
2022-02-21 17:23:07 +00:00
Jeff Young cf9fafaba5 EEschema features need to process ~ for empty string; not EDA_TEXT.
Fixes https://gitlab.com/kicad/code/kicad/issues/10918
2022-02-20 20:52:39 +00:00
Jeff Young b041a77cfa Don't paste into hidden columns.
Fixes https://gitlab.com/kicad/code/kicad/issues/10168

(cherry picked from commit c27ec5cae1)
2022-02-20 01:03:08 +00:00
Jeff Young cfae33e7a8 Fix Mac button-text grid control spacing.
(cherry picked from commit 9fb3032c77)
2022-02-17 14:30:47 +00:00
Seth Hillbrand 470d7d228d Fix wxT overzealous replacements
A couple of regex mistakes slipped through and need to be reverted here
2022-02-16 17:21:49 -08:00
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