Commit Graph

8427 Commits

Author SHA1 Message Date
Jeff Young 480a9ac77d Implement undo/redo around Pad Edit Mode changes.
(cherry picked from commit 69a1b30b8a)
2023-09-02 11:18:34 +01:00
jean-pierre charras 07e13c51d1 UNIT_BINDER: allows more room to show values (especially inches need room)
Fixes #15539
https://gitlab.com/kicad/code/kicad/-/issues/15539
2023-08-30 09:14:28 +02:00
jean-pierre charras f9b59b4fdf PANEL_SETUP_SEVERITIES: fix a missing init (m_severitiesPage) creating a crash.
PANEL_SETUP_SEVERITIES::ImportSettingsFrom(): ensure the option to set
actually exists before setting it.
2023-08-29 10:56:40 +02:00
Marek Roszko 7ca59e24c6 Force fontconfig to look at the correct path for fonts.conf on windows
(cherry picked from commit 208d146a03)
2023-08-26 17:59:47 +00:00
Marek Roszko e1a2d60672 Don't call FcInitLoadConfigAndFonts after FcInit() already happened
We are only the default global FcConfig created by calling FcInitLoadConfigAndFonts inside FcInit().
Calling FcInitLoadConfigAndFonts does nothing but creating another FcConfig option that never gets disposed or used because we use the FcConfig functions with null


(cherry picked from commit 53bf7b71c6)
2023-08-26 17:59:28 +00:00
Jeff Young f3dd5b73f8 TestDanglingEnds needs to test sheet pins as well.
Also fixes a bug where zooming doesn't get a redraw until mouse moves.

Also fixes a couple of bugs where dangling markers on SCH_SHEET_PINs
and SCH_HIERLABELs weren't getting drawn.

Also simplifies drawing algorithm by removing aesthetic offset (which
wasn't implemented when pin is drawn as part of selection VIEW_GROUP).

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

(cherry picked from commit c8e8b71198)
2023-08-20 18:44:40 +01:00
Jeff Young af1561b848 Don't double-offset effective text shapes.
Also fixes several bugs with intersheet ref fields.  (It's possible for
other fields to have an ID of 0.)

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

(cherry picked from commit eedf319ba4)
2023-08-19 20:09:47 +01:00
jean-pierre charras 691931f74d kicad-cli, export plot PDF and SVG: add missing option --drill-shape-opt.
It allows pad/via holes to ber plotted at actual size, small size, or not.
This option exists in GUI, but was missing in kicad-cli.

(cherry picked from commit f18feb2a46)
2023-08-19 10:56:32 -04:00
Jeff Young 043892bdc6 Disable "Override individual item colors" on read-only themes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15426

(cherry picked from commit 88db775d32)
2023-08-17 11:49:58 +01:00
Marek Roszko 27a0bd2535 Backport changes to merge distance for step export
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14910
2023-08-16 22:12:55 -04:00
Jon Evans 8f57fd82a0 DbLib: Provide more useful feedback when table is misconfigured 2023-08-15 16:45:10 -04:00
Jeff Young 83624acfd2 Allow GetLayer() to be used with single-layer zones.
Also fixes a bug in GetFirstLayer() where we were checking
m_layerSet.size() (which is always 60) rather than
m_layerSet.count() (which is the number of set layers).

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

(cherry picked from commit 8bb895373a)
2023-08-15 17:51:52 +01:00
Jon Evans 88dfe6eb9c Stricter API for LIB_TABLE
Prevent nickname map or row parent getting out of sync

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


(cherry picked from commit 4c4bbdc8f3)
2023-08-15 01:39:09 +00:00
jean-pierre charras c4914a64bb PCB_GRID_HELPER::BestSnapAnchor() fix overflow due to use of int.
GRID_HELPER::GetVisibleGrid() needs double, does not work with int (overflow).
Fixes #15389
https://gitlab.com/kicad/code/kicad/-/issues/15389
2023-08-11 18:04:27 +02:00
Seth Hillbrand 9de58a29e3 Avoid bulking drawing sheet polygons
On the drawing sheet, the polygons are always filled and shouldn't have
additional stroking

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

(cherry picked from commit e71422d2cf)
2023-08-04 13:51:38 -07:00
Jon Evans 56aff41b7e Database libraries performance improvements
Rework caching system and optimize queries


(cherry picked from commit 39a5929f33)
2023-08-04 17:57:46 +00:00
Alex Shvartzkop 4918ac6307 Improvements to Altium PCB/footprint importer:
- Support unicode footprint names
- Set default footprint text size and thickness to match KLC
- Position Reference at the top, Value at the bottom of fp bounding box

(cherry picked from commit 24452f41ad)
2023-08-04 16:50:09 +03:00
Jon Evans 033ab9ac71 DbLib: Remove slashes from table display names
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15074


(cherry picked from commit 0e617774dd)
2023-08-03 13:07:25 +00:00
Ian McInerney b4b49a4296 Don't skip loading the wxWidgets message catalogs
The wxWidgets message catalog contains translations for strings that are
in the wx-provided dialogs, and these strings aren't contained in our
message catalog.

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

(Cherry-picked from 5e740c354e)
2023-08-02 23:20:21 +01:00
Mark Roszko e016fa913f Backport change to block IME on the canvas itself 2023-07-17 02:07:07 +00:00
Mark Roszko b2f72020bd Add policy to alter curl revoke settings on windows 2023-07-14 00:06:42 +00:00
Marek Roszko d73f96e3d8 Add support for enum based policies
(cherry picked from commit b0fa2561b6)
2023-07-14 00:04:31 +00:00
Marek Roszko 171c44507a Add env variable to turn on curl verbose 2023-07-10 21:40:50 -04:00
Alex Shvartzkop 59c06bcaf1 OpenGL GAL: fix reserved vertices calculation in drawSegmentChain.
(cherry picked from commit 6a123e2381)
2023-07-10 20:18:47 +05:00
Jeff Young 4a3ae82748 Don't process SCINTILLA_TRICKS onCharHook when autocomplete is active.
(ESC being the exception that proves the rule.)

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

(cherry picked from commit c2f2247ae3)
2023-07-09 21:54:00 +01:00
Jeff Young 63f33a42e3 Don't trip over null strings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14989

(cherry picked from commit ecb2fcd559)
2023-07-09 21:08:51 +01:00
Jeff Young 19e128041b Handle some Mac-standard keyboard shortcuts in Scintilla.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14973

(cherry picked from commit b3235ce667)
2023-07-09 21:08:51 +01:00
Jeff Young 76f8b3df22 Treat undo as backspace and/or escape when drawing. Ignore redo.
Undo == backspace when drawing a polygon or chained lines.  Otherwise
it's an escape.

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

(cherry picked from commit ef6866757e)
2023-07-09 21:08:51 +01:00
jean-pierre charras e1e791fc75 *.wks files: always save text font when it is not the default font.
From Master branch
Fixes #15154
https://gitlab.com/kicad/code/kicad/-/issues/15154
2023-07-09 11:51:58 +02:00
Alex Shvartzkop d6eb66c738 PDF plotting: Fix "Show Page" in Foxit PDF Reader.
pageNum is an Integer. Acrobat seems to convert automatically.

(cherry picked from commit 698fffb128)
2023-07-09 05:46:11 +05:00
Alex Shvartzkop 0ffef66cb6 Fix bitmap transparency in Cairo GAL.
Cairo ARGB32 format needs alpha pre-multiplied with color.

(cherry picked from commit f286015bc7)
2023-07-09 05:46:11 +05:00
jean-pierre charras 713cb032b5 Fix some (minor) issues when drawing shadow texts of RULER_ITEM and pin names.
From master branch (commits 355575e4, 1698fb66 and 965aaa21)
Fixes #15019
https://gitlab.com/kicad/code/kicad/-/issues/15019
2023-07-06 19:57:49 +02:00
Seth Hillbrand 7bcd3e2262 Cherry-pick part of 14f6e32
This brings EDA_DRAW_FRAME::LockFile into compliance with the lockfile.h
status code.  This was part of a larger commit in the master branch but
the return code checking is needed for v7
2023-06-23 14:11:23 +02:00
Seth Hillbrand 8648017b42 Prevent ro directories from showing lockfile error
(cherry picked from commit d94fd5f979)
2023-06-21 14:53:33 +02:00
Seth Hillbrand 6fc393c7db Upgrade file locking
wxSingleInstanceChecker is meant for running programs, not file locking.
This implements an RAII class for file locking that stores the lock
files next to the file being locked, allowing it to be easily found and
removed.  Also includes the ability to override the lock, with
information about the original owner

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

(cherry picked from commit 122be418bb)
2023-06-18 01:06:40 +02:00
Seth Hillbrand 361fdcce1b Maintain file permissions when renaming
Temporary and autosave files do not neccessarily have the correct
permissions set to replace existing project files.  This updates the
permissions to match the existing values where possible

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

(cherry picked from commit 48ecd742eb)
2023-06-18 01:06:14 +02:00
Jeff Young c183e3f342 Cleanup. 2023-06-17 16:04:56 +01:00
Alex Shvartzkop a5ded3341a Adapt panels to PAGED_DIALOG sizing algorithm.
Also some cosmetic fixes (GTK).

(cherry picked from commit d3be62f644)
2023-06-17 15:19:26 +03:00
Alex Shvartzkop bb15c56a2d PAGED_DIALOG: make sure the dialog is big enough to contain page.
(cherry picked from commit 6ace80700e)
2023-06-17 15:19:26 +03:00
Alex Shvartzkop c61931996a PAGED_DIALOG: allow setting initial size in ctor.
(cherry picked from commit f5da58e17d)
2023-06-17 15:19:26 +03:00
Wayne Stambaugh 4e79d1ecdd Command line PCB gerber export fix and improvement.
The --board-plot-params argument was never parsed so it was always ignored.

[ADDED] A '--no-protel-ext' option to allow plotting gerbers with the KiCad
        file extension (gbr) instead of the Protel gerber file extensions.
2023-06-16 07:14:37 -04:00
Jeff Young a01f9f99f4 More protection around an exceedingly dangerous hack.
The API is needed for wxFormBuilder, and I couldn't figure out any
way around it, but we can at least reduce the risk of someone calling
it accidentally (again).

(cherry picked from commit 46564055f4)
2023-06-14 13:57:27 +01:00
Alex Shvartzkop 08186f4131 Fix lock condition in GL_CONTEXT_MANAGER, remove unnecessary assert.
Assert handler is already being called from wxCHECK.


(cherry picked from commit dfb05c4f4b)
2023-06-14 04:46:06 +00:00
jean-pierre charras 4294202074 gr_basic.cpp: ensure a pen with width = 0 is transparent.
Setting its color to COLOR4D::UNSPECIFIED (i.e. opacity = 0) is not enough
for all  platforms (i.e. Windows)
From master branch
Fixes #14915
https://gitlab.com/kicad/code/kicad/-/issues/14915
2023-06-12 08:45:01 +02:00
Jeff Young 370bdef8d0 Clear the playerFrame lookup cache when closing frames.
WindowIds aren't actually guaranteed to be unique, and we don't
perform a dynamic_cast on the result of FindWindowById() because
of linker issues....

This is an attempt to fix KICAD-39.

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

(cherry picked from commit d6aefc458c)
2023-06-11 22:31:24 +01:00
Salvador E. Tropea 561441b48a Adds the missing plot formats to `kicad-cli sch export` 2023-06-11 13:56:24 -04:00
Alex Shvartzkop 1a3dc72af8 Avoid deadlock when OpenGL context can't be created.
Previously, with aContext == nullptr, the mutex would lock, but not unlock.
Then it got deadlocked inside OPENGL_GAL dtor.

(cherry picked from commit eaf65f7d53)
2023-06-11 20:12:22 +03:00
Nils VAN ZUIJLEN c919694f37 cli: add an option to the pcb exports for plotting negative svg and pdf
ADDED: The -n or --negative option for exporting negative svg or pdf plots
from kicad-cli. Example usage: kicad-cli pcb export svg -n -l B.Cu board.kicad_pcb
2023-06-10 14:50:27 -04:00
Jeff Young 4060ec3038 Treat canvas item as current when tree view contains no selection.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12702

(cherry picked from commit 1528f4700c)
2023-06-10 10:57:14 +01:00
Alex 13820bc002 Support --mirror option in "kicad-cli pcb export pdf"
(cherry picked from commit 2450435131)
2023-06-10 04:58:07 +03:00