93 Commits

Author SHA1 Message Date
Mark Roszko
0f97f51ba1 Fix unit binder dropdown not working on windows
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20626
2025-09-08 06:36:20 -04:00
Seth Hillbrand
29c4d9b197 Add width/height adjustment to reference image
Allows setting specific width or height on a reference image instead of
just scale

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18567
2025-08-26 11:22:32 -07:00
Jeff Young
4819487ea2 Save/restore state of UNIT_BINDER and other textboxes. 2025-08-08 13:54:27 +01:00
Jeff Young
eece18f4a8 Formatting. 2025-04-13 18:23:52 +01:00
Jeff Young
3328dc48be Don't leave dangling event handler.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20380
2025-03-19 10:14:24 +00:00
Wayne Stambaugh
e09b095533 Common folder housekeeping part 3. 2025-01-16 11:50:08 -05:00
Jeff Young
dd7c076bc9 Use std::optional for pad connection overrides.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19555
2025-01-09 17:32:05 +00: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
Marek Roszko
22d13546fb Some DisplayError -> DisplayErrorMessage 2024-12-20 19:28:30 -05:00
Jeff Young
dee59bd4f5 UNIT_BINDER does it's own eval processing.
Also fixes a related bug where editing a eval'ed control
from "0" to empty doesn't reset the original text.
2024-11-09 21:47:39 +00: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
Jeff Young
e62b4f8ff4 Add nullable int and double to property system. 2024-02-08 18:14:31 +00:00
Jeff Young
3651cad7fd Don't fire events when going back to original text in onSetFocus().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15851
2023-10-27 14:58:30 +01:00
Jeff Young
b089630b4c Simplify Import Graphics.
Removed no-longer-required differentiation between importing
footprint vs board objects.

Renamed files to match the dialog.

Made Position At and Set Layer optional checkboxes.
Removed Group Items checkbox.  (In the unlikely event that you don't
want a group, do an UnGroup after importing.)

Flattened out labelled-sizers in the dialog.

Removed importers blacklist, which hasn't been active for at least 4
years.

Fixed undo/redo bug that caused items to be no-longer-grouped after
a redo.
2023-10-19 01:31:13 +01:00
Jeff Young
b9e1908ffe Try to find a happier medium for text entry box widths.
Most dialogs have units outside the text entry, and the likelihood
of 14 significant digits & units is low enough to allow scrolling
in that case.
2023-10-06 19:46:55 +01:00
jean-pierre charras
17775e5377 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:12:59 +02:00
Jeff Young
8b1fd62d35 Make pad & via teardrops 1st-class citizens (props of the pad/via)
Change teardrop generation to rely more heavily on BOARD_CONNECTIVITY
for improved performance.

Add updating of teardrops on BOARD_COMMIT::Push().

Also converts m_CopperItemRTreeCache to std::shared_ptr.
We don't copy it around anyway, and having to create a new set
of std::unique_ptr's for each operation is likely to be more
expensive than std::shared_ptr's overhead.
2023-05-19 18:02:03 +01:00
Alex
efbd360440 Fix double negative signs in mask/paste margin overrides. 2023-05-12 15:44:37 +03:00
Jeff Young
9b4627e782 Don't pass a FRAME-based UNITS_PROVIDER to a modeless dialog.
(The dialog may outlive said frame.)
Should fix Sentry KICAD-3A.
2023-04-03 17:18:33 +01:00
Wayne Stambaugh
66f6168163 Fix mode-less dialog issues.
Don't assume the dialog is mode-less and call Destroy() from within a
dialog method.  This will most assuredly crash if the dialog is shown
modally or quasi-modally.

Don't leak memory for mode-less dialogs created on the stack.  Make sure
when the parent frame window is closed that all mode-less dialog memory
is cleaned up.  Dialogs are not child windows like controls and toolbars
so their memory does not automatically get cleaned up when the parent
window is destroyed.

Do not directly access frame parent window's pointer in dialog destructors.
Apparently the tear down order when destroying mode-less dialogs is not
guaranteed so the parent window may get deleted before the dialog causing
a crash when accessing the parent window pointer from the dialog dtor.

Do not close mode-less dialogs in the parent frame's destructor.  This
doesn't guarantee that the dialog(s) will be destroyed before the parent
but it may reduce some careless mode-less dialog event handling in the
future.
2023-03-13 12:04:01 -04:00
Jeff Young
3144459939 Fix issue with text edit boxes being too narrow on wxWidgets 3.2. 2022-12-12 20:45:48 +00:00
Jeff Young
2a32bc4372 Pay attention to indeterminate state in onUnitsChanged().
Fixes https://gitlab.com/kicad/code/kicad/issues/13127
2022-12-12 17:37:16 +00:00
Jon Evans
ad8e5891d2 Properties: update evaluator locale when creating editors 2022-12-06 17:56:33 -05:00
Jon Evans
071a2ec46d Properties: clean up some unit handling
Make sure units show up properly in editor on focus kill
Make sure editor shows correct value initially
2022-12-06 08:55:48 -05:00
Jon Evans
40f9a59255 Remove disconnects from SetControl
These aren't needed as the control is going to be destroyed by the grid,
and can cause a crash on exit if the control is destroyed before the unit binder.
2022-12-06 08:06:16 -05:00
Jon Evans
b673202a4e Remove extraneous event binding 2022-12-05 20:44:47 -05:00
Jon Evans
d0024bd9f7 Properties: clear text ctrl from unit binder before it is destroyed
The lifetime of this text ctrl is managed by the property grid, so
we need to catch when it is hidden before destruction in order to avoid stale pointers being used to handle unit change events.

Credit to @dsa-t for the fix
2022-12-05 19:33:20 -05:00
Seth Hillbrand
77b763f8ba Change binding with units 2022-12-05 15:34:23 -08:00
Seth Hillbrand
6f43915b25 Don't keep a stale iu reference around
The IU memory areas are const but we need to be able to update this when
the frame changes, so use pointers instead
2022-12-05 13:33:45 -08:00
Seth Hillbrand
54dd494ff2 Remove frame dependency from UNIT_BINDER
Place the frame information into the event data instead of keeping a
pointer (potentially invalid) into the frame
2022-12-04 16:50:27 -08:00
Jeff Young
f805fd267f Divorce UNIT_BINDER from wxFrame.
This allows us to supply Pcbnew or Eeschema as the unitsProvider when
called from the main frame.

Fixes https://gitlab.com/kicad/code/kicad/issues/13066
2022-12-04 11:51:44 +00:00
Jon Evans
4134db3c47 GCC fixes 2022-12-02 22:38:15 -05:00
Jon Evans
2091aaba2f Properties: Move angles to UNIT_BINDER
Also add support for unicode degree sign in evaluator
2022-12-02 21:25:42 -05:00
Jon Evans
5e352d2a66 Properties: improve handling of unit binders 2022-12-02 19:37:44 -05:00
Jon Evans
4285b38b74 Properties: Handle units changes correctly
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12885
2022-11-24 17:15:07 -05:00
Jon Evans
32b3f24f8b Thanks xorg 2022-11-06 18:27:18 -05:00
Jon Evans
f708dad5cd Don't use frame events for PROPERTY_EDITOR_UNIT_BINDER 2022-11-06 18:26:17 -05:00
Jon Evans
68de92313e Properties: move to custom editor for distances; refactoring
Also fix display of angle values since EDA_ANGLE was introduced

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12290
2022-11-06 11:40:45 -05:00
Jeff Young
e02c05d38f Add unit and eval support to WX_GRIDs.
Fixes https://gitlab.com/kicad/code/kicad/issues/1871

Fixes https://gitlab.com/kicad/code/kicad/issues/4285
2022-10-11 23:40:58 +01:00
Marek Roszko
46471247ff Some header cleanup 2022-09-27 23:25:20 -04:00
Jeff Young
45d6b4a9fc Readability improvements. 2022-09-19 11:18:20 +01:00
Mark Roszko
b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
Marek Roszko
03aa63bd50 Move 5 helpers to EDA_UNIT_UTILS since they aren't iu specific 2022-08-29 20:11:03 -04:00
jean-pierre charras
993c446fdf Fix some warnings detected by PVS-STUDIO (most are not used vars) 2022-07-25 18:23:52 +02:00
Jon Evans
f4372a2de9 UNIT_BINDER should support long long ints
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10870

(cherry picked from commit eb1164fc938a631f9846e18a32d7963321893e2b)
2022-05-31 21:54:51 -04:00
jean-pierre charras
2bba277c5e Unit binder: fix hang and DIALOG_WIRE_BUS_PROPERTIES: fix uninitialized variable.
The hang can be Windows specific.
2022-03-19 10:22:41 +01:00
Jeff Young
ce21da8cbb Select all when UNIT_BINDER is a token rather than a string.
Fixes https://gitlab.com/kicad/code/kicad/issues/9757
2022-03-16 14:56:32 +00:00
Jeff Young
0091c76a6f Excise deci-degrees from UNIT_BINDER.
Fixes https://gitlab.com/kicad/code/kicad/issues/10495
2022-01-19 00:10:32 +00:00
Jeff Young
3f98769a77 More EDA_ANGLE.
Includes bug fix for catastrophic error in Add() for converting to
radians.

Includes bug fixes for the fact that the pcbnew test can't seem to
find the ANGLE_* objects (getting all 0's instead).
2022-01-15 01:30:04 +00:00