Commit Graph

5203 Commits

Author SHA1 Message Date
Wayne Stambaugh 22bece0922 Schematic import bug fix.
Check for already loaded schematics in the current sheet path as well
as the current project root sheet path to prevent multiple loads of
shared schematic.  This bug was causing shared sheets to be loaded more
than once which caused instance data to get separated by each copy rather
than saved in one copy of the schematic which would result in all instance
data being lost except the last saved copy of the schematic.  This bug has
been around forever and may be the cause of some unexplained schematic
instance data corruption issues.  This bug does not apply when opening
the full project.

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

(cherry picked from commit 84f927d057)
2022-12-15 11:44:59 -05:00
jean-pierre charras 9ac87132af Fix a few issues related to field names and their translation.
- Do not use translated field names outside strings displayed in dialogs.
- fix code that does not work well with default locale.
- fix some (not all) I18n issues in DIALOG_UPDATE_SYMBOL_FIELDS.

(cherry picked from commit 20d1d0705e)
2022-11-30 11:19:21 -08:00
Jeff Young 2f47857abc Move zone borders back to their "host" layer.
Zone borders shouldn't be affected by zone-opacity control; we always
draw them in full layer opacity.

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

(cherry picked from commit 25f06eed8c)
2022-11-29 23:05:50 +00:00
Seth Hillbrand 2029fc4e8f Don't use modifiers when moving with keyboard
The modifier keys on the keyboard control the motion spacing (Ctrl) and
shouldn't be confused with the modifier key used to disable grid
snapping when moving with the mouse (also Ctrl)

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

(cherry picked from commit 4f6b853756)
2022-11-28 11:06:24 -08:00
Seth Hillbrand c9cc29593a Don't add non-groupable items to groups
This is a re-implementation of 259e41be

Fixes https://gitlab.com/kicad/code/kicad/issues/13026
2022-11-28 09:26:48 -08:00
jean-pierre charras 8e331628b6 Do not add a title/comment in mandatory field strings when writting netlists.
This is mainly for "Sheetfile" property because current it is the only one
that has a title when plotting/drawing it.
2022-10-22 15:38:26 +02:00
Seth Hillbrand 5f6de83981 Ensure that token size is large enough
Input tokens can be arbitrary, so output needs to keep pace

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

(cherry picked from commit 19378675f1)
2022-10-21 08:40:30 -07:00
Alex bd1698f80e Allow GAL_DRAWING_CONTEXT dtor to throw exceptions.
These destructors are implicitly noexcept, which woudnt't allow
OpenGL errors to be caught in DoRePaint.

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

(cherry picked from commit 39089ad805)
2022-10-21 17:24:11 +03:00
Alex 3b0466f3e8 Fix selection and entering in nested groups.
Fixes https://gitlab.com/kicad/code/kicad/issues/12586

(cherry picked from commit 0fea6f5ac3)
2022-10-21 17:18:07 +03:00
jean-pierre charras 2827835720 board_stackup_manager: fix incorrect behavior when adding a new dielectric layer.
From Master branch
Fixes #12680
https://gitlab.com/kicad/code/kicad/issues/12680
2022-10-20 11:47:04 +02:00
Jeff Young da85a5f6bf Work around more instances of the wxWidgets color string locale bug.
Fixes https://gitlab.com/kicad/code/kicad/issues/12552

(cherry picked from commit c0a666507c)
2022-10-19 12:56:17 +01:00
Jeff Young 7dfa715a45 Bug fixes for layer expression processing.
1) Push a VAR onto the stack, not a resolved value
2) Don't collapse a PCB_LAYER_VALUE to a VALUE during processing
3) Make sure we run overloaded operators from the correct side

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

(cherry picked from commit cf1565a16a)
2022-09-28 14:00:25 +01:00
Jeff Young e21995c401 Prune pasted data of non-enabled layers.
Fixes https://gitlab.com/kicad/code/kicad/issues/11997

(cherry picked from commit 5b3bd9be83)
2022-09-28 12:47:14 +01:00
Seth Hillbrand 440d324c9e Don't prevent immediate actions while router active
Immediate actions that can take place are useful.  We should only be
preventing immediate actions while actively routing or dragging

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

(cherry picked from commit 91fbb5c957)
2022-09-06 11:04:33 -07:00
Seth Hillbrand 83eb9e03b1 Keep the reset text correct
Ensures that after setting the initial dialog page, we also set the
proper text in the reset button as the event does not get fired

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

(cherry picked from commit 9faff78258)
2022-09-06 10:42:02 -07:00
Roberto Fernandez Bautista e760579828 Fix annotation of incomplete multi-unit symbols and re-annotation of duplicates
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11496

(cherry picked from commit 55f22c526a)
2022-09-02 12:01:33 +02:00
Jeff Young 9bce3c243a Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/issues/12140

(cherry picked from commit e3e24322bb)
2022-09-01 14:35:36 +01:00
Wayne Stambaugh cfde5300d7 Fix wxWidgets 3.1 and later deprecated build warnings.
wxWidgets 3.1 has deprecated wxPATH_NORM_ALL when normalizing file
paths when calling wxFileName::Normalize().  This change keeps the
existing behavior except in places where our own internal
ExpandEnvVarSubstitutions() to expand environment variables.

(cherry picked from commit 898ec0d094)
2022-08-17 14:07:06 -04:00
Marek Roszko 64acd8bd47 Throw in default initializers for MINOPTMAX to silence coverity 2022-08-16 23:53:42 -04:00
Seth Hillbrand 39dd51490d Protect against double-refresh
The wxtimer can fire multiple times and there exists the possiblity for
this to happen before the flags are properly set to prevent it.  This
creates a concurrency mutex to skip the EDA_DRAW_PANEL_GAL refresh if
one is already underway.

Fixes https://gitlab.com/kicad/code/kicad/issues/12094
2022-07-27 20:28:18 -07:00
Jeff Young 2fdddb970f Bug fixes for printing vias.
Blind/buried and microvias didn't get their layers trimmed properly,
nor did through vias with dropped pads.

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

(cherry picked from commit 231ac567b8)
2022-07-25 20:05:40 +01:00
Jeff Young 0321d96b1e Fill in missing bits of LAYER variable for printing/plotting.
Fixes https://gitlab.com/kicad/code/kicad/issues/11788

(cherry picked from commit f22cf1cc3a)
2022-07-25 19:49:09 +01:00
Alex 33027b8f66 OpenGL: Fix SetSwapInterval logic.
- Don't use GLX extension functions unless they are supported on the
connection. GLEW only checks for client library support.

- Don't try to set swap interval using glXSwapIntervalSGI when vsync is
not requested.

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

(cherry picked from commit 0e2d3236b5)
2022-07-18 10:19:36 -07:00
Seth Hillbrand c1ec63d4f9 Protect the Kiway dereference
Also find a few more places where we are reaching into a new frame to
perform actions that need to have dialogs closed.

Running actions should also wait for the next cycle rather than being
immediately executed when we are calling into a new frame.  This allow
for the cleanup actions onClose() to happen prior to the next action
starting

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

(cherry picked from commit 93fb00d815)
2022-07-18 09:48:50 -07:00
Seth Hillbrand 995b2c517d Catch some crashes on shutdown
These can happen when a tool is active that sends signals when exiting
(e.g. deselectEvent).  These may be caught by the active loop in another
tool which might try to update the UI after it has been freed.  By
marking all tools as "shutdown", the only event returned to them should
be null.  As an extra precaution, we flag the shutdown globally within
the tool manager and check this flag before launching either events or
new tools

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

(cherry picked from commit db4f2d9dd8)
2022-07-18 09:48:16 -07:00
Seth Hillbrand a8c0bc0430 Keep track of blocking windows
Allows the calling KiWAY player to send messages to the blocking window
before signaling a separate call

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

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

(cherry picked from commit b5bf1da251)
2022-07-18 09:47:32 -07:00
jean-pierre charras 926818097b Fix compatibility issues with wxWidgets 3.2 and gcc 12.1:
hastable.h: remove deprecated binary/unary base class not actually needed.
Fix  compil warnings.
From master branch.
2022-07-12 18:24:12 +02:00
jean-pierre charras fd65bd8e6e Rework on bitmap_info.cpp cmake build process.
on gcc 12.1 / msys2 the large initialized list in bitmap_info.cpp breaks the
compiler (perhaps a bug in the compiler).
So, as workaround, the initialization sequence is modified.
Form master branch
2022-07-12 17:34:25 +02:00
Jon Evans eb1164fc93 UNIT_BINDER should support long long ints
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10870
2022-05-31 21:50:52 -04:00
Marek Roszko 7563f51212 Fix eda_doc not looking for schematic locally
It looks like this was overlooked by Jeff in 2020 not realizing eda_doc isn't built under eeschema but common in cc9ac37a0e


(cherry picked from commit f85251ef75)
2022-05-11 03:33:40 +00:00
jean-pierre charras 2de1bd7a4a Ensure "Open Recent" and "Clear files" menu titles are updated after language change.
From Master branch.
2022-04-14 15:06:17 +02:00
Jeff Young a60e7e27b6 A better blob vs web detector.
Since we're in a deflated state, a long web *could* still have a very
small area.  So check max extents instead.

(cherry picked from commit 1dae5eb7c4)
2022-04-12 13:24:34 +01:00
Marek Roszko fe11bc8330 Change the behavior of ACTION_MENU::Add to require clones if required outside the function 2022-04-11 20:39:08 -04:00
Jeff Young 529048dac1 Better error reporting for DP uncoupled length.
Fixes https://gitlab.com/kicad/code/kicad/issues/10087

(cherry picked from commit 722b2588f4)
2022-04-09 23:09:10 +01:00
Jeff Young be2e0cc272 A right-to-left single-char sel followed by typing leaves cursor the same.
Fixes https://gitlab.com/kicad/code/kicad/issues/11349

(cherry picked from commit dead84e7a1)
2022-04-09 21:23:54 +01:00
jean-pierre charras 6127ae92a5 PLOTTER: do not clamp coordinates to an arbitrary value.
Previously, coordinates were clamped to +- 60 inches. It makes no sense to
clamp them at plotter level: max cooed depends on the editor (schematic/board...)
Rename MAX_PAGE_SIZE_MILS to MAX_PAGE_SIZE_EESCHEMA_MILS and use it only for Eeschema.
Fixes #11196
https://gitlab.com/kicad/code/kicad/issues/11196

(cherry picked from commit 21144481d2)
2022-04-04 13:52:21 -07:00
dsa-t fdfe5a813e Clamp cursor to limits of coordinates representation
Also improves large distance handling.

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

(cherry picked from commit 68655540eb)
2022-04-04 13:38:50 -07:00
Seth Hillbrand d9fe48171b Attempt to fix the Mac DPI grid mixing
When moving windows between monitors on Mac that changes the DPI, we
observe incorrect re-sizing of columns and rows.  This attempts to
rectify the situation by avoiding DPI changes for Mac builds.

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

(cherry picked from commit 9722a05820)
2022-03-22 11:23:49 -07:00
Seth Hillbrand e33bf78d96 Separate flashing check for connectivity
When building the connectivity database, we should not be using the
connectivity to check for shapes.

To make this deterministic, we introduce two flags (ALWAYS_FLASH and
NEVER_FLASH) that are used with connectivity building to determine
whether a pad is flashed for connectivity or not.  ZONE <-> PAD/VIA
connectivity will be checked with ALWAYS_FLASHED and all other
connectivity will be checked with NEVER_FLASHED if they are marked for
potential annular ring removal.  If they are not marked for removal,
they will be checked ALWAYS_FLASHED.

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

(cherry picked from commit 442aae19d9)
2022-03-21 08:37:53 -07: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
Seth Hillbrand 79b6991d7b Fix broken unit select context menu
The fix for https://gitlab.com/kicad/code/kicad/issues/10529 kicked the
subsequent IDs for unit selection off the maximum ID value for popup
menus.  This increases the maximum popup number (integers are free)
2022-03-02 16:32:04 -08:00
Jeff Young 354c320329 Make sure Cleanup handles shapes other than segments.
Fixes https://gitlab.com/kicad/code/kicad/issues/10955
2022-03-02 15:26:02 +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
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
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
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 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
Jeff Young 8e1e8e1492 More wxT-ification. 2022-02-09 11:14:38 +00:00