Commit Graph

100 Commits

Author SHA1 Message Date
Alex Shvartzkop 6c21e0607b Use wxFileName::Mkdir instead of wxMkDir.
wxMkDir is a CRT wrapper that doesn't actually return bool.
2023-11-06 17:02:34 +03:00
Jeff Young 6c6a7cf862 Provide a callback for supplying file filters just-in-time.
This allows us to make them dependent on the current plugin type in
the fp lib table.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13959
2023-10-28 11:18:17 +01:00
Wayne Stambaugh 6269453416 Coverity warning fixes. 2023-10-27 16:48:14 -04:00
Jon Evans eb5b3db063 Add bitmap bundle support to BITMAP_SCALE
Change a bunch of buttons and toolbars to use it

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14119
2023-10-22 14:02:06 -04:00
Marek Roszko 6d3b846eb5 Add more missing destructor event cleanups 2023-10-02 07:22:00 -04:00
Marek Roszko 6b12a12b3e On second thought rename PROJECT_PCBNEW to PROJECT_PCB 2023-09-27 23:15:54 -04:00
Marek Roszko 7e8b18035f Eliminate the conditional pcbnew/cvpcb definition of PROJECT 2023-09-27 20:53:46 -04:00
Alex Shvartzkop ff49d5ada9 Fix ambiguous overloads on wx 3.3 2023-09-14 19:05:46 +03:00
Alex Shvartzkop a5a93f808e Populate symbol library type choices from SCH_IO_MGR list. 2023-09-05 07:19:15 +03:00
Seth Hillbrand fa15f8aa0c Fix compile error
wxMkDir's mode is required for linux but not windows (yay)
2023-08-28 14:57:28 -07:00
Roberto Fernandez Bautista 32b6deb8b1 ADDED Migrate libraries button in Footprint Library Table
Allows easy migration of legacy and non-KiCad footprint libraries
2023-08-28 22:44:10 +02:00
Seth Hillbrand db8e15ce88 Require wxWidgets 3.2
Removes old defines and work arounds for earlier wx versions and adds a
CMake requirement to use at least 3.2 (or the minimum matching wxPython
version)
2023-08-23 22:02:56 +00:00
Alex Shvartzkop 76e0d5981d Import system refactor for PCB plugins. 2023-08-15 05:26:12 +03:00
Jon Evans 4c4bbdc8f3 Stricter API for LIB_TABLE
Prevent nickname map or row parent getting out of sync

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15315
2023-08-06 00:56:51 -04:00
jean-pierre charras 639da0eb5a Fix a wxWidgets alert when deleting the last entry in a lib table. 2023-06-09 08:09:22 +02:00
Jeff Young f3d3ade1dc Increased mutex safety.
Don't even query the size() without having at least a shared_lock.

*May* prevent KICAD-4S, but seems unlikely.
2023-06-05 11:01:10 +01:00
Roberto Fernandez Bautista a119bd604d Refactor: Move DIALOG_PLUGIN_OPTIONS to common and use enum for event ID 2023-05-28 23:56:41 +02:00
Jeff Young 7252c7471c Use enums for column ids.
(The nickname, in particular, is no longer column 1.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14291
2023-04-02 15:10:06 +01:00
Roberto Fernandez Bautista 6f5321c481 ADDED: CADSTAR .cpa footprint libraries 2023-03-16 21:07:08 +01:00
Marek Roszko dffd2da8c8 Fix the shared_lock added and micro-opt the reindex 2023-02-18 11:28:19 -05:00
qu1ck 2975f53647 PCM: auto reload global libs after dialog is run
This adds Reset() method to KIFACE to reload global libs stored in
global static vars.
Also refactors some lib reload code in various frames to have
common MAIL_RELOAD_LIB handler.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12500
2023-02-17 17:24:32 +00:00
Jeff Young 2a5bb71fbd ADDED operating point text variables for labels and symbols.
ADDED formatting for cursors and operationg points

Also fixes a bunch of bugs to make the new cursors work with .ac sims.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/6965
2023-02-11 21:11:07 +00:00
Jon Evans d04cda35c5 Handle hidden attribute in fp-lib-table
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13689
2023-01-28 09:23:25 -05:00
Seth Hillbrand efe12f2da5 Cleanup variable naming
Also remove ancient/unused code for lazy resolving
2023-01-23 22:21:12 +00:00
Seth Hillbrand a9ed47f06c Update KICAD6->KICAD7 2023-01-23 22:21:12 +00:00
Jeff Young d9a90519f9 Flatten (and fix layout) of library table managers. 2023-01-20 14:19:58 +00:00
Seth Hillbrand 2399759c03 Allow default sexpr libs to have '.' and no .pretty
We default to KICAD_SEXPR format.  In this case, if the library doesn't
have the .pretty extension, the full directory name including a '.' is
the correct nickname

Fixes https://gitlab.com/kicad/code/kicad/issues/13388
2023-01-06 10:08:32 -08:00
Jeff Young e7300ffb5c Improved column sizing in library setup dialogs. 2022-12-28 16:27:03 +00:00
Jeff Young c0872364d4 Get rid of bloated bitmap buttons on wxWidgets 3.2. 2022-12-13 20:48:02 +00:00
Jeff Young 1b3f03a800 Don't feed wxWidgets negative column widths. 2022-11-16 13:33:55 +00:00
Scott Hanson 5b9fcc0ba0 Cvpcb: Reload footprint libraries in CVPCB
CHANGED: Reload footprint libraries in CVPCB when footprint library table(fp-lib-table) is updated
2022-09-27 22:58:03 +00:00
Jon Evans 300d92438c Allow hiding symbol library tables from symbol chooser
Hidden but loaded libraries are useful when using database libraries
2022-08-26 20:18:40 -04:00
Miklós Márton f2382a7bd1 Add Make selected active/inactive actions to the symbol libraries
context menu

Fixes #11372
2022-06-21 23:32:02 +00:00
Jeff Young 8f937b17a2 Remove wxWidgets 3.0.x hack.
Fixes https://gitlab.com/kicad/code/kicad/issues/11540
2022-05-07 23:24:55 +01:00
Jeff Young 7ccac79192 More wxString wide literals. 2022-02-05 21:29:34 +00:00
Thomas Pointhuber 2cc9517cfd altium: Allow extraction of names of footprints stored in *.PcbLib file
See: https://gitlab.com/kicad/code/kicad/-/issues/10274
2022-01-17 19:51:51 +01:00
Seth Hillbrand 84cdc9701f Partially reverts d877f041
Based on discussion in https://gitlab.com/kicad/code/kicad/-/merge_requests/1029
we will keep the original behavior.  The new routines to get stock paths
are still useful (possibly in scripting) and are kept
2021-12-06 16:14:40 -08:00
Franck Bourdonnec d877f04198 fixe paths 2021-12-02 20:23:00 +00:00
Jeff Young 574bef2237 Normalize drawing sheet path to env vars & prj, not just prj.
Also cleans up the dialog a bit.

Also changes the workings of NormalizePath to return the input if
it couldn't be shortened which saves open coding that behaviour in
all its callers.

Fixes https://gitlab.com/kicad/code/kicad/issues/9036
2021-10-02 23:39:45 +01:00
Jeff Young c536a4c4f2 Work around annoying wxWidgets assert. 2021-08-10 16:51:30 +01:00
Jeff Young 77680eba30 Naming conventions. 2021-08-05 14:31:36 +01:00
Jeff Young b1b4caee6a Escape "naughty" characters in symbol names.
It's tempting to say that we don't need to exclude filename chars
from symbols, but we might regret that decision down the road.  Better
to just escape them.

Fixes https://gitlab.com/kicad/code/kicad/issues/8694
2021-06-30 13:12:57 +01:00
Jeff Young 9554aaee7f Can't use wxDD_MULTIPLE before 3.1.4.
Fixes https://gitlab.com/kicad/code/kicad/issues/8465
2021-05-22 22:19:37 +01:00
Jeff Young ee00d8386f Make sure dir case can handle multiple selection too.
Files case already can.

Fixes https://gitlab.com/kicad/code/kicad/issues/8465
2021-05-22 20:39:26 +01:00
Wayne Stambaugh 6e017b475d Warn user before removing invalid rows from library table entries.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8080
2021-05-08 08:58:54 -04:00
jean-pierre charras 0427bda768 Remove useless wx/wx.h include, that create sometimes compil warnings on msys.
wx/wx.h includes all wxWidgets .h files, and sometimes creates collision
names in #define between kicad and windows headers
Moreover, blindly including a lot of useless files is compil time consuming
2021-05-01 19:32:15 +02:00
Jon Evans c04e19f9ac Include optimization: move some things from common.h to point-of-use 2021-03-20 12:09:18 -04:00
Jeff Young 36259b1f6b Refresh lib trees after editing library tables.
Also make sure that we grab the library item descriptions from their
source rather than just the cached tree copy.

Fixes https://gitlab.com/kicad/code/kicad/issues/7875
2021-03-17 14:54:18 +00:00
Jeff Young b2ac9cc29f Formatting & naming conventions. 2021-03-15 19:04:59 +00:00
Jon Evans 18037e2f65 Rework bitmap system to load from archived PNGs
Bitmaps are now identified by an enum class instead of by pointers.
Bitmap loading and caching is now handled by a class in common, and
we no longer compile most bitmaps into the binary, so there is no
longer a bitmaps static library.

Instead, bitmaps are archived to a .tar.gz file which is installed
in ${KICAD_DATA}/resources/images.tar.gz

The source PNGs are checked in to Git as the original CPP files were,
so that people can build without the required dependencies to convert
SVGs to PNGs.

Initial support is also added for dark theme icons, although this
is not yet exposed in the GUI.

Stubs are present for multi-resolution image resources, but this is
not fully-baked yet and could use some refinement.
2021-03-11 08:37:35 -05:00