Commit Graph

7187 Commits

Author SHA1 Message Date
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
Jeff Young 847fa7f2c4 Add PCB_ARCs to type enum.
Fixes https://gitlab.com/kicad/code/kicad/issues/11384

(cherry picked from commit d01c2a6614)
2022-04-14 18:37:25 +01: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 6818eff90e Improvements to Eagle dimension importing.
1) Import leaders
2) Drop radius and angle dimensions
3) Import dimension text sizes
4) Correctly interpret which side dimension offset is on
5) Correclty handle offsets for non-cardinal dimensions

Fixes https://gitlab.com/kicad/code/kicad/issues/10763
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
Seth Hillbrand c2d72180f8 Revert "Change the behavior of ACTION_MENU::Add to require clones if required outside the function"
This reverts commit 651f50a26d.
2022-04-11 11:03:19 -07:00
Marek Roszko 651f50a26d Change the behavior of ACTION_MENU::Add to require clones if required outside the function
Fix https://gitlab.com/kicad/code/kicad/-/issues/10994
2022-04-10 22:40:58 -04:00
Marek Roszko 99456d4351 Don't pointlessly construct a wxBitmap
(cherry picked from commit fd83e675a2)
2022-04-10 11:48:10 +00: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
Jeff Young 43929781a2 On-the-fly translations for pin electrical types.
Also add on-the-fly translation for editor title bars.

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

(cherry picked from commit 68ca385e07)
2022-04-09 21:22:50 +01: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 c23679d9bd Consistently handle env/prj variables
User-defined variables cannot be used for internally-reserved variables

Fixes https://gitlab.com/kicad/code/kicad/issues/11232
2022-03-31 17:05:25 -07:00