Commit Graph

7198 Commits

Author SHA1 Message Date
Seth Hillbrand 61d4a5bfbe Resolve embedded text vars
Title Block text variables are embedded into the pcb file and should
be used for resolving when the project file is missing

(cherry picked from commit d1bf889e71)
2022-11-03 10:26:06 -07:00
Marek Roszko 6ca2f6a6e1 Try a hackfix for windows icon scaling
Related https://gitlab.com/kicad/code/kicad/-/issues/11880


(cherry picked from commit 321d6e3ea8)
2022-10-31 21:47:11 +00:00
Marek Roszko 2ff3fac7b3 Don't fix the visibility icon size or it will never scale properly
Related https://gitlab.com/kicad/code/kicad/-/issues/11880


(cherry picked from commit c0f8810759)
2022-10-31 21:46:53 +00:00
Seth Hillbrand 3dfbe582db Add "Letter-like character" Omega for Unicode x2126
Fixes https://gitlab.com/kicad/code/kicad/issues/12531

(cherry picked from commit 1b38acd9c6)
2022-10-21 09:08:58 -07:00
Seth Hillbrand 03a1a8e6d3 Fix missing token initializer
Fixes https://gitlab.com/kicad/code/kicad/issues/12555

(cherry picked from commit fdf9fcc24d)
2022-10-21 08:58:59 -07: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
Jeff Young de9ae28bdb Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/issues/12467

(cherry picked from commit bb1eb94aa0)
2022-10-21 11:16:19 +01: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 1bf1620157 Improve default new-library destination logic to be more project aware.
Fixes https://gitlab.com/kicad/code/kicad/issues/12570

(cherry picked from commit 2be9586c38)
2022-10-19 12:59:24 +01: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 e2219a0c4d Attempt to work-around wxWidgets bug with Serbian & Russian locales.
Fixes https://gitlab.com/kicad/code/kicad/issues/12002

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

(cherry picked from commit 7386e64923)
2022-10-19 12:52:03 +01:00
Marek Roszko 03ed7a4a27 Ensure the socket server is killed during destruction of the kiway player
(cherry picked from commit 8ae48bb093)
2022-09-29 02:22:54 +00: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 4987809fe3 Make Scintilla paste a separate undo operation.
Fixes https://gitlab.com/kicad/code/kicad/issues/11756

(cherry picked from commit c3a5947fe6)
2022-09-28 12:49:12 +01:00
Jeff Young 894f424d14 Don't give Scintilla a colour with alpha; it doesn't know what to do.
Fixes https://gitlab.com/kicad/code/kicad/issues/10829

(cherry picked from commit 1b104f20b6)
2022-09-28 12:48:24 +01:00
Mark Roszko 030a562ba6 Fix autopan sticking on Windows due to lost events
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11425
2022-09-07 14:30:59 +00: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
Seth Hillbrand 70b69af313 Hide cursor while warping on Wayland
Based on https://gitlab.freedesktop.org/xorg/xserver/-/issues/734 we
hide the window cursor prior to warping, which allows XWayland to
reposition the cursor.  This is only performed when Wayland is detected;
all other configurations call the standard warp routine

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

(cherry picked from commit a118f20464)
2022-09-06 10:13:40 -07:00
Jeff Young c276280e5c Remove curly brace from string encoding.
It causes issues with formatting constructs and text variable refs,
and it's not a reserved character even in filenames.

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

(cherry picked from commit 71724bea0c)
2022-09-04 10:37:32 +01:00
Roberto Fernandez Bautista 5606714952 DIALOG_PASTE_SPECIAL: Set focus on OK button
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12285


(cherry picked from commit 8a02f2f809)
2022-08-25 19:26:20 +00:00
jean-pierre charras 4d9802760e Set locale in SaveToFile routine before calling json stuff.
It avoid wxWidgets alerts about locale when running some python scripts
2022-08-24 09:30:05 +02:00
Marek Roszko 64220656e9 Avoid missing null check in RC_TREE_MODEL::DeleteItems
(cherry picked from commit 19e27ef587)
2022-08-17 22:08:59 +00:00
Wayne Stambaugh 40977514ce Fix more wxWidgets 3.1 and later deprecated build warnings. 2022-08-17 14:13:33 -04: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
Forrest Voight 30c83ed055 kiid.cpp: Fix Boost version incompatibility and use of boost::*::detail
Fix compile with Boost 1.65.1 (and possibly some or all of the 1.59-1.66
range); remove dependence on private boost::*::detail members.

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

Comment tweaks by Mark Roszko @mroszko

(cherry picked from commit bbc0c61ccb)
2022-08-17 11:37:12 -04:00
jean-pierre charras 7769069078 DIALOG_COLOR_PICKER: fix an issue in DC.SetDeviceOrigin() due to changes in wxWidgets.
DC.SetDeviceOrigin() behavior has changed in version 3.1.7 (or 3.1.6), and the settings
needs a small change.
From master branch
Fixes #12204
https://gitlab.com/kicad/code/kicad/issues/12204
2022-08-11 10:20:46 +02:00
jean-pierre charras 5f00847a86 Eeschema: another trial to fix bitmap printing in wx version > 3.1.5
We had on a regular basis problems when printing bitmaps.
Probably due to issues both in wx and in our code.
From master branch
2022-08-04 14:56:37 +02:00
jean-pierre charras 147b11abe0 Fix an issue when printing bitmaps when not on wxWidgets 3.1.6 and 3.1.7
This this a hack to fix a bug in wxWidgets.
From Master branch
2022-07-29 13:35:51 +02: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 d9fef3da72 Don't allow 0 line-width for unfilled shapes.
Fixes https://gitlab.com/kicad/code/kicad/issues/12010

(cherry picked from commit d0547cbde7)
2022-07-25 21:46:27 +01: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
dsa-t 17f220590b OpenGL: Use glGetProgramiv instead of the extension function.
(cherry picked from commit 3a76435eda)
2022-07-18 10:20:04 -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 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
jean-pierre charras 86f9f169cd Pcbnew, printing in B&W: never draw the background color.
Otherwise a black background is printed.
Fixes #11625
https://gitlab.com/kicad/code/kicad/issues/11625
2022-07-04 12:03:17 +02:00
Seth Hillbrand 617755f991 Treat all units equally when converting to string
Excessive trucation in mils can lead to data loss when round-tripping
values.  Better to keep decimal count consistent between units

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

(cherry picked from commit 67d9729311)
2022-06-21 15:30:24 -07:00
Seth Hillbrand 7128f6adf0 Prevent focus stealing in some Linux WMs
OnEnter events will only raise the windows within KiCad rather than
between applications

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

(cherry picked from commit 110728af48)
2022-06-13 10:18:13 -07:00
jean-pierre charras 87d55402e4 Pcbnew, physical layer names: never translate them (they are proper noun)
physical layer names are not translated in files, but they were translated
in UI. Using these translated names can create issues and misunderstanding for users.
Now physical layer names are seen as proper nouns and are never translated.
Fixes #11715
https://gitlab.com/kicad/code/kicad/issues/11715
2022-06-04 11:07:49 +02:00
Roberto Fernandez Bautista 2553da38b4 CADSTAR Schematic: Fix parsing of ATTRCOLORS.
Apparently there can be a `INVISIBLE` token. Unclear what it means,
but lets read it anyway


(cherry picked from commit 41bf397d24)
2022-06-03 21:21:15 +00: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
Seth Hillbrand 592c2c6872 Handle settings sequencing
Avoids crash when window close ordering places 3d viewer after the
common settings are closed

(cherry picked from commit c0a9a02591)
2022-05-25 16:58:10 -07:00
jean-pierre charras f25d74628b Plot pad outlines on Fab files: fix many issues. Depending on
plotter type and pad type, the plotted shapes were not always the outlines,
but a outline inside the pad shape (due to legacy reasons). In many cases the
plotted shape was in fact incorrect. Now the actual pads outlines are plotted
without modification.
From Master branch
2022-05-13 14:25:02 +02:00
Marek Roszko d45ce2f659 Suppress wx3.1.6 assert because it wants the window handle for dpi
(cherry picked from commit ccf235a8c3)
2022-05-11 22:53:02 +00: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
Johannes Maibaum ea0d9076e7 Fix stock templates path for flatpak
Commit ad251b7b8c broke the template path
lookup for flatpak via `PATHS::GetStockTemplatesPath()`. Fix this by
using `::GetStockEDALibraryPath()` in all EDA Library related path
lookup functions.

`GetStockEDALibraryPath()` effectively does the same as
`GetStockDataPath()`, but it takes care to check the
`KICAD_LIBRARY_DATA` build config, which is being used by flatpak to
point to the flatpak EDA Library extensions in
`/app/extensions/Library/`.

Closes #11174
2022-05-10 17:57:23 +00:00
jean-pierre charras 6971e409bf Pcbnew: fix lost of focus after clicking on a wxChoice in toolbar.
After changing track width, via size, grid or zoom from the toolbar, the
canvas has no longer the focus on Windows. So we force the focus after clicking
on these widgets.
From Master branch
Fixes #11103
https://gitlab.com/kicad/code/kicad/issues/11103
2022-05-05 11:54:47 +02:00