1216 Commits

Author SHA1 Message Date
John Beard
a090b86b87 Separate generic aspects of NET_SELECTOR_COMBOPOPUP
Lots of this class is reusable, and it's a fiddly one
that can be useful elsewhere.
2024-10-27 05:13:32 +08:00
Seth Hillbrand
33328fb864 Minor formatting fixes 2024-10-18 13:35:25 -07:00
John Beard
8abbae9dc2 Sym edit: add copy/paste/cut/etc actions to fp filter table
Implemented as a "TRICKS" class that could wrap any wxListBox
with similar effects.
2024-10-13 08:34:51 +08:00
John Beard
215533f31a Unify flip direction handling
There was a gentle mish-mash of booleans, some with
true being left/right and some up/down, and some functions that
can flip in both axes (which is never actually done, and doesn't
really make geometric sense).

Replace all this with the FLIP_DIRECTION enum class, which makes
the intention completely unambiguous.

This also then allows a small scattering of simplifications,
because everything takes the same type and you don't have to
fiddle booleans to fit.
2024-09-27 17:13:13 +01:00
John Beard
717847cc31 UNIT_BINDER: Fix typo affecting transformed points
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18788
2024-09-27 10:53:50 +01:00
John Beard
46e7228945 UNIT_BINDER: Handle binding of combo-box option lists
This is useful if you want to give some preset options
to a user (e.g. recently used value) but stil have them
controlled and presented using the UNIT_BINDER logic.
2024-09-19 06:35:43 +01:00
Alex Shvartzkop
36019314e9 Make simulation reporter warnings non-fatal.
Adds REPORTER::HasMessageOfSeverity for WX_STRING_REPORTER,
which allows us to show simulation warnings and fail only if there's errors.

Also fixes a crash when SPICE_GENERATOR_KIBIS throws an IO_ERROR.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18143
2024-09-05 05:59:35 +03:00
Marek Roszko
89a3b7baa5 Move some things starting from reporter to kicommon 2024-09-02 21:15:14 -04:00
Mark Roszko
c19aa8170b Revert "Move some things starting from reporter to kicommon"
This reverts commit 3d893254e9477ade449654be872f85c075485c5b
2024-08-28 01:21:40 +00:00
Marek Roszko
3d893254e9 Move some things starting from reporter to kicommon 2024-08-27 20:33:08 -04:00
Jeff Young
b549c4feec Drawing sheet can't share glyph cache entries with editors.
(They use different internal units.)

Also fixes a fialure of CAIRO_GAL to reset the fill
and stroke after drawing outline glyphs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18579
2024-08-22 12:23:21 -06:00
Mark Roszko
869a3ee21f Unbind events in KISTATUSBAR destructor 2024-08-16 02:21:37 +00:00
Mark Roszko
2f7f6c48ca Add missing unbinds to STD_BITMAP_BUTTON 2024-08-16 02:15:31 +00:00
Mark Roszko
6641183d09 Undo errant bind removal 2024-08-16 01:55:54 +00:00
Mark Roszko
64977cbcc8 Unbind BITMAP_BUTTON events during destruct 2024-08-16 01:40:54 +00:00
Jeff Young
3b6a33c59a Fill in a lot more calls to DIALOG_SHIM::OnModify().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18443
2024-08-11 12:45:36 -06:00
John Beard
d933ed964e Move LAYER_PRESENTATION to widgets/
Since this is code used by widgets for UI presentation purposes.

Also saves some unnexessary includes in headers.
2024-08-07 06:49:53 +08:00
John Beard
db457f52fa Move layer presentation logic to a separate class
The separates it from the LAYER_SELECTOR class - deciding
what color a layer is (say) is separate to managing the
actual selection of the layer. For example, sel_layer.cpp
only needs the presentation logic. This also makes it eaiser
to compose rather than inherit.

Additonally, break out the layer pair swatch function
to this class.

This will also be needed by the layer pair manager UI.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/15227
2024-08-06 23:45:55 +08:00
John Beard
15924958d9 Add wxGrid autosizer helper
This moves a fiddly little bit of logic used by a few UI
classes into a central location.

Also means that the paths dialog learns to expand the
first cell when it needs to (like the text variable
panel).
2024-08-06 23:45:55 +08:00
James J
7ce00e511b Multi-netclass support 2024-07-26 20:49:29 +00:00
Jeff Young
9fcbd4e6d0 Slight reduction in asserts. 2024-07-18 18:01:05 +01: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
Jeff Young
02a08bf9b1 ADDED: RMB > Copy item for HTML_WINDOW.
(Used at least in Footprint and Symbol Chooser details
panes.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17904
2024-07-08 20:55:08 +01:00
Jeff Young
f6031da58c ADDED: RMB-menu for Copy in inspectors.
Includes Inspect > Resolve Clearance, Inspect > Resolve
Constraints and everything else that uses WX_HTML_REPORT_BOX.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18321
2024-07-07 22:41:15 +01:00
Jeff Young
5c71d26b25 Regularise spacing with number badges. 2024-07-07 14:34:24 +01:00
Jeff Young
7f6ab7043b Clean up more exception processing in simulation GUI.
This allows us to more correctly report errors without
dialog issues, logs popping up, etc.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18259
2024-07-03 13:32:44 +01:00
Alex Shvartzkop
cec378b70d HiDPI: use logical icon size when changing indicator state. 2024-06-30 00:18:48 +03: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
ece46223c9 Fix shadowed/conflicting enum values. 2024-06-21 16:16:29 +03:00
Seth Hillbrand
5c699e3c1e Handle not found fonts reliably
Check if the font isn't found when selecting (we seem to always have a
selection even if we fail on GTK) and properly set the index of the
final <not found> font name
2024-06-16 17:20:58 -07:00
jean-pierre charras
16e708a0e7 Fix minor compil and Coverity warnings. 2024-06-15 11:20:21 +02:00
Seth Hillbrand
9f4dfe77cb Freeze the adapter to avoid invalid deref
GTK tries to get the parent item of selected elements when unselecting.
If we don't freeze, we run the risk of crashing if a selected item is
removed before being unselected.  This causes a wx warning but a) this
is suppressed in release and b) warning message is better than crash.
See next commit for fix to avoid common case of the error
2024-06-14 16:49:56 -07:00
Alex Shvartzkop
cf7ad330e9 Fix some platform ifdef checks. 2024-06-01 06:49:11 +03:00
Jeff Young
7151f9a131 Formatting. 2024-05-31 10:36:51 +01:00
Alex Shvartzkop
7a0d75a5c4 Improve GRID_CELL_ICON_TEXT_RENDERER rendering on hidpi monitors. 2024-05-30 03:56:30 +03:00
Alex Shvartzkop
41b30e6ac6 Use logical size to center the bitmap in bitmap button. 2024-05-27 11:25:55 +03:00
Alex Shvartzkop
b6aa01a572 Accept bitmap bundles for menu items (but don't use it yet). 2024-05-27 01:02:12 +03:00
Alex Shvartzkop
c401e3d24b Prefer wxFB sizes in bitmap buttons. 2024-05-27 00:12:55 +03:00
Alex Shvartzkop
5e64bd6256 Center bitmaps in bitmap buttons by default. 2024-05-27 00:12:55 +03:00
Alex Shvartzkop
2a5903cd9b More universal way of scaling indicator icon bitmaps. 2024-05-26 22:14:52 +03:00
Jeff Young
30b5adde17 Fix spacing/scaling of indicators on MacOS.
Also pushes indicator scaling improvements to GerbView.
2024-05-26 14:37:05 +01:00
Alex Shvartzkop
b64a30f44b Fix color swatches and color picker dialog on GTK with window scaling. 2024-05-26 13:02:37 +03:00
Alex Shvartzkop
296630d484 Allow using higher resolution bitmaps in bitmap buttons on GTK. 2024-05-26 09:23:43 +03:00
Alex Shvartzkop
1afbcb04db Improve WX_GRID col label height to avoid clipping on hidpi. 2024-05-26 08:05:25 +03:00
Alex Shvartzkop
0b4ff7b859 Improve indicator icons in hidpi monitors. 2024-05-26 01:16:47 +03:00
dsa-t
9a1b3471fd Revert "Improve toolbar bitmap redraw performance on Windows."
This reverts commit 6170151cbc4d68958ee028bf4b0de1cebb6e6125
2024-05-25 20:32:48 +00:00
Alex Shvartzkop
6170151cbc Improve toolbar bitmap redraw performance on Windows.
Especially noticeable on high dpi.
2024-05-25 21:47:51 +03:00
Marek Roszko
808517dd74 Remove no longer needed hack on msw with wx 3.2.5
wxButton::GetDefaultSize was fixed and returns the correct size now
2024-05-25 10:45:27 -04:00
Jeff Young
ecb7cd6b84 Fix color-swatch sizing on MacOS.
Also fixes BITMAP_BUTTON sizing.
2024-05-24 18:27:15 +01:00
Jeff Young
edae328ca6 Push multi-sweep traces down into MathPlot.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17215
2024-05-23 12:24:56 +01:00