60 Commits

Author SHA1 Message Date
Alex Shvartzkop
76849b05a7 Make controls of grid cell editors mostly invisible on creation.
The controls were visible momentarily when clicking on cells, at least on MSW.

The wxStyledTextCtrl is still visible, but is not multi-line with scrollbars.
2025-01-22 13:52:28 +03:00
Jeff Young
240a745aa7 Hack-fix for paste into std dialog search box.
It's hard to know how widely this fix needs to be
applied, but this should at least get most of the
cases.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19684
2025-01-20 12:58:00 +00:00
Wayne Stambaugh
e09b095533 Common folder housekeeping part 3. 2025-01-16 11:50:08 -05:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Seth Hillbrand
77797103f7 Add ability to embed files in various elements
Schematics, symbols, boards and footprints all get the ability to store
files inside their file structures.  File lookups now have a
kicad-embed:// URI to allow various parts of KiCad to refer to files
stored in this manner.

kicad-embed://datasheet.pdf references the file named "datasheet.pdf"
embedded in the document.  Embeds are allowed in schematics, boards,
symbols and footprints.  Currently supported embeddings are Datasheets,
3D Models and drawingsheets

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

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17827
2024-07-15 16:06:55 -07:00
jean-pierre charras
8737c6eb3c footprint selector in symbol properties: fix footprint selection issue.
When using the button to select a footprint using the footprint chooser
dialog, the new footprint was not always taken in account (perhaps MSW specific).
It was due to the code to update the footprint name was between Disable() and
Enable, thus creating a loss of some events in the complex grid edition stuff.
This is now replaced by a lock flag to protect this code to be executed when
it should not.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18270
2024-06-27 19:56:57 +02:00
Alex Shvartzkop
0b4ff7b859 Improve indicator icons in hidpi monitors. 2024-05-26 01:16:47 +03:00
Jeff Young
a99377c1ec The user can cancel the opening of many editors.
Don't play dice with the devil.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17989
2024-05-08 18:21:42 +01:00
Seth Hillbrand
3435c6ebee Prevent double-entry into footprint load
Avoids double-clicking on the footprint library symbol crashing due to
overwriting the global footprint table by multiple instances

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17040
2024-04-19 17:21:18 -07:00
Alex Shvartzkop
76b7cdd128 Improve grid cell editors appearance. 2024-04-13 23:26:01 +03:00
Alex Shvartzkop
1516aaf163 Improve custom grid cell editors' margins on MSW. 2024-04-13 03:54:04 +03:00
Alex Shvartzkop
aa51cc5167 Remove macOS size tweak in custom grid cell editors.
Since the text field now has the no-border flag, it shouldn't be needed.
2024-04-13 03:54:04 +03:00
Alex Shvartzkop
5d22c1adee Make grid cell editors with extra button consistent with normal text cell editors. 2024-04-11 00:47:27 +03:00
Jeff Young
72ba31ba27 Pass symbol's netlist to footprint preview widget.
This allows us to show the pin functions on the corresponding
pads.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17349
2024-03-09 15:01:59 +00:00
Jeff Young
85f0dd279c Push fileFilter callback function down a level.
(The GRID_CELL_PATH_EDITOR is shared by the whole column.)

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13959
2024-01-22 18:27:31 +00:00
Ian McInerney
53fd1aaf5e Don't try accessing library table rows that don't exist
When exiting the dialog without actually visiting the table, the grid
cursor could be missing, so it could return -1. Guard against that
condition.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16342
2023-12-11 23:36:51 +00:00
Ian McInerney
d8bb9b1e66 Don't update file browser filter if control doesn't exist
When the grid is being validated, SetValue is called, which then ends up
running the file filter update. However, if the cell was never selected,
the file browser button would never have been created.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16316
2023-12-08 22:09:55 +00:00
Ian McInerney
be9c3b08b5 Fix library table file filters
The schematic librayr table was missing the Kicad Sexpr filter, and also
the filter inside the grid editor was never updated when the library
plugin type was changed in the grid, so a library of the new type could
not be selected.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16278
2023-12-07 11:16:02 +00: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
Jeff Young
fa11e9138d ADDED support for pin and fp filtering in FOOTPRINT_CHOOSER.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7176
2023-09-29 17:03:50 +01:00
Jeff Young
974da4ea7c Push most of DIALOG_CHOOSE_SYMBOL down into PANEL_SYMBOL_CHOOSER.
Includes a dialog wrapper (DIALOG_SYMBOL_CHOOSER) and a frame
wrapper (SYMBOL_CHOOSER_FRAME).
2023-09-29 00:13:12 +01:00
Jeff Young
1047130046 Push most of footprint chooser into PANEL_FOOTPRINT_CHOOSER.
Create 2 wrappers for it: DIALOG_FOOTPRINT_CHOOSER and
FOOTPRINT_CHOOSER_FRAME.  The first now gets called from wxGrid
editors, text button editors (such as Change Footprints), etc.

Retire FOOTPRINT_VIEWER_FRAME_MODAL.  FOOTPRINT_VIEWER_FRAME still
exists, but has very few uses at this point.
2023-09-27 16:02:13 +01:00
Jeff Young
e10158ff10 ADDED show pin names on footprint pads when assigning to symbol.
Fixes https://gitlab.com/kicad/code/kicad/issues/4576
2022-07-24 23:41:41 +01:00
Marek Roszko
f85251ef75 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 cc9ac37a0e5bfdc6628f1b8cc70c1acc5a1a34c8
2022-05-10 21:28:48 -04:00
Jeff Young
9fb3032c77 Fix Mac button-text grid control spacing. 2022-02-17 12:42:10 +00:00
Seth Hillbrand
b87e4efc68 Add additional buffer space around cell text buttons
The baseline -1 buffer works for some GTK themes but not others.  -3
appears to work for chunky themes like those used in KDE (and others).

Fixes https://gitlab.com/kicad/code/kicad/issues/5690
2022-01-26 12:44:11 -08:00
Seth Hillbrand
759abb7928 Make sure that relpath gets a value
Even if we are not asking for normalized paths, we need to return a
value in the relpath.  This modifies 574bef2237277530ca2f5598b44746d0c861ae83

Fixes https://gitlab.com/kicad/code/kicad/issues/9363
2021-10-11 09:19:41 -07: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
6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Jeff Young
293f207356 Hopefully the last of the symbol id escaping issues.
Fixes https://gitlab.com/kicad/code/kicad/issues/8694
2021-07-28 19:44:42 +01:00
Jeff Young
6d4c454e8c Fix some more missing escaping for symbol ids.
Fixes https://gitlab.com/kicad/code/kicad/issues/8694
2021-07-28 18:37:09 +01:00
Marek Roszko
d946d6e68f Cleanup some pgm_base.h includes 2021-06-08 21:56:00 -04:00
Marek Roszko
7faee5eda5 Stop salt the eart with wxhtml.h 2021-06-03 07:49:49 -04:00
Wayne Stambaugh
19607f1488 Fix file browser text button default path handling. 2021-05-27 14:19:06 -04:00
Ian McInerney
0bdce00c42 Be explicit we don't care about the wxID of the control 2021-04-16 17:49:52 +01:00
Marek Roszko
43e93cc801 Force disable the native dropdown caret on grid comboctrl's we create
Fix #7212
2021-04-14 22:54:40 -04:00
Marek Roszko
cb215a0abe Ensure our grid helper comboctrls generate returns as events instead of internally processing
Fix #1874
2021-04-14 21:37:21 -04: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
Seth Hillbrand
05b559c9dc Quiet gcc warnings 2021-02-18 11:20:27 -08:00
Jeff Young
fd91529d88 Quiet Coverity. 2021-02-18 11:53:36 +00:00
Jeff Young
b6a7981e62 Write changes back to grid after using file explorer.
Fixes https://gitlab.com/kicad/code/kicad/issues/7361
2021-02-17 14:08:53 +00:00
Michael Kavanagh
154e19b6e7 Icons: use common prefix for small 16x16 2021-01-02 23:16:33 +00:00
Marek Roszko
e928b2d8fd Split EDA_UNITS out from common. 2020-10-25 00:02:52 -04:00
jean-pierre charras
f6b4b66a86 Avoid include wx/wx.h in many files that do not actually use this include.
Including wx.h includes the full set of wxWidgets include files, that is not good,
and can create some conflicts with some Windows headers on msys2.
2020-10-18 18:21:34 +02:00
Mark Roszko
a9532c2fa1 Add browse button to footprint 3d settings
Add normalization to 3d settings and footprint library table editor
2020-09-01 02:00:38 +00:00
Jeff Young
b13559c926 Add envVar and text variable resolution to plot directory paths.
Fixes https://gitlab.com/kicad/code/kicad/issues/3808
2020-04-05 23:56:24 +01:00
Jeff Young
cc9ac37a0e Add text variable support to envVar processing. 2020-04-05 20:52:26 +01:00
Jeff Young
535033c5c9 Enable editing of sheet fields. 2020-03-07 18:52:30 +00:00
Ian McInerney
b445ce6632 Clean up pointer casting
* Make note of when dynamic cast is actually needed
* Convert some to static cast when we know the type for sure
2020-01-12 19:45:37 +00:00
Jeff Young
10c25a2290 Update frame type enum to match current class names. 2019-09-06 23:38:20 +01:00