149 Commits

Author SHA1 Message Date
Seth Hillbrand
fe4de09d71 Add undo/redo functionality to dialog boxes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18986
2025-08-26 14:39:19 -07:00
Seth Hillbrand
626e9d9d1b We want to save invariant numbers also
If the number is invariant, save it below, don't prematurely exit

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21544
2025-08-24 16:16:09 -07:00
Jeff Young
29a818218a Don't fire events when loading dialog state.
(Fixes crash when opening Pin Properties dialog.)
2025-08-21 12:44:09 +01:00
Jeff Young
8e45f03bd3 Bounds checking.
Fixes KICAD-TZK
2025-08-18 21:25:14 +01:00
Jeff Young
33c73d7db4 Fix crashes when settings manager doesn't exist yet. 2025-08-14 11:33:25 +01:00
Jeff Young
d27d80ab80 Don't crash in absence of settings. 2025-08-13 16:29:11 +01:00
Jeff Young
c85e5c08e4 Improve quasimodal comment. 2025-08-13 16:22:51 +01:00
Jeff Young
8ed367f8cd Prevent all-radio-buttons-unset case. 2025-08-13 16:22:51 +01:00
Jeff Young
5805f67459 Save notebook page titles rather than index.
(Some notebooks have variable pages from invocation
to invocation.)

Also adds bounds-checking where appropriate.
2025-08-09 17:18:57 +01:00
Jeff Young
5a358d99bb Save notebook page titles rather than index.
(Some notebooks have variable pages from invocation
to invocation.)
2025-08-09 17:11:54 +01:00
Jeff Young
4819487ea2 Save/restore state of UNIT_BINDER and other textboxes. 2025-08-08 13:54:27 +01:00
Jeff Young
ac867f6aa7 Add owner-drawn combos to control state saving.
(Also fixes LAYER_BOX_SELECTOR, etc.)

Also fixes a bug in saving wxComboBox state (we
need to save the value, not the index).
2025-08-08 13:54:26 +01:00
Jeff Young
d2293ab56a Fix key generation for dialog control state.
(Previous algo overwrote className and then later
tried to use it to find siblings.)
2025-08-07 11:44:47 +01:00
Jeff Young
241d9a4c30 Separate locked & unlocked vias in global deletions.
Also allows a dialog to opt out of control-state
saving at the top level (rather than on every control).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21441
2025-08-07 11:44:47 +01:00
Seth Hillbrand
7dc83fbffd Ensure dialogs are visible on all Spaces
We never want to hide dialogs if their parent is on a different Space
(MacOS-specific terminology), so set the window property to show
everywhere when showing a dialog

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13906
2025-08-06 11:48:07 -07:00
Seth Hillbrand
bf16dcfbe8 Make all windows remember their preferences
Hook into DIALOG_SHIM to remember stylistic preferences for windows such
as position, size, sash position, notebook selection, etc.

Dialogs and controls can opt out of this by setting a client data user
property "persist" to false.

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

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21108
2025-08-03 20:22:30 -07:00
Jeff Young
9d074c1679 See if we can't fix the ever-growing window bug.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20120

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10609
2025-07-21 17:24:29 +01:00
Jeff Young
d0fe69bcda Formatting. 2025-07-21 16:29:50 +01:00
Marek Roszko
34be0452fd Add some additional breadcrumbs 2025-06-07 09:01:05 -04:00
Seth Hillbrand
8a0e9bef5a Do not insert newlines in single line controls
2d2f443aa4d48fc960968b2260d592ba75bfdbdf allowed the use of shift-enter
when creating tables for newlines.  However, this should not be applied
to all text controls.  We split the ones by IsMultiLine to determine if
the shift-return is a newline or a dialog close

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20866
2025-05-14 17:13:13 -07:00
Seth Hillbrand
fe0422b958 Fix infinite loop in QuasiModal
Now that we use RAII nuller, we need to avoid the case where
m_qmodal_loop is nulled before it ends

(cherry picked from commit 75fa0ab0c99ad7d44c0d3fccd513174982bd7771)
2025-05-09 10:28:29 -07:00
Damjan
2d2f443aa4 pcbnew: Multi-line text in table cell 2025-04-14 14:07:36 +00:00
Jeff Young
f951497a4f Code brevity. 2025-03-01 21:58:31 +00:00
Jeff Young
b74c2791f4 Allow context menus in footprint chooser when called from Eeschema.
Also moves several RAII utility classes (some of which
were duplicated in open code) to a common header file.
2025-02-24 11:08:29 +00:00
Jeff Young
8a0bff7351 Improved naming. 2025-01-20 18:28:33 +00: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
5c8f4697ca Common folder housekeeping part 1. 2025-01-12 12:06:45 -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
Wayne Stambaugh
2e7d819b5d Fix thread deadlock when closing the footprint chooser dialog.
Fixing this required disabling the footprint/3D viewer canvas drawing
before destroying the canvas in the dialog dtor.  This in turn required
adding a virtual method to DIALOG_SHIM that can be overridden by the
derived object to allow performing actions during dialog shutdown that
can be problematic when performed in the dialog dtor.  Please note that
this only works for quasi-modal dialogs.  Modal and modeless dialogs
should use close window events.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18107
2024-12-18 08:13:15 -05:00
Andrej Valek
3ad92bc8db ShowModal: override method in DIALOG_SHIM
All DIALOG_SHIM dialogues which should be modal, has a problem on OSX
that parent could be lost. So call ReparentModal to fix this before
calling the base ShowModal method. This should fix the problem when
modal window has been hidden when windows were switched.

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

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17460
2024-10-27 16:37:47 +00:00
Jeff Young
5ad8f0e387 Better OnModify() handling for Symbol Fields Table. 2024-08-11 12:45:36 -06:00
Alex Shvartzkop
16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Seth Hillbrand
ef3e5b18dc Only raise the parent when show=false
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16243
2023-12-04 16:55:36 -08:00
Huibean
530b72972d Add frame window monitor display index compare with saved dialog and centre it if display changed which caused dialog disapper 2023-11-20 19:43:34 +00:00
Jeff Young
0de966f9ce Add m_isClosing guard in an attempt to prevent KICAD-1XF. 2023-11-18 12:45:09 +00:00
Jeff Young
6d74cc031e Refine Scintilla margin recognition.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16044
2023-11-07 15:02:49 +00:00
Jeff Young
50ff5e616f Don't delete text when cancelling changes.
Also changes margins of compile button so it correctly lines up at
the top of the error window.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16002
2023-11-02 18:37:55 +00:00
Marek Roszko
3a567a3ae1 Unbind event handlers in the DIALOG_SHIM destructor to prevent late event crashes
Fixes KICAD-1XF
2023-10-01 17:54:25 -04:00
Seth Hillbrand
b2ef620ea6 Focus back to the main window after dialog
Mouse actions would focus the window but we explicitly set it here to
allow keyboard shortcuts

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15603
2023-09-20 17:38:06 -07:00
Jeff Young
f28d29ce1a Center paged dialog after lazy-loading first page. 2023-08-15 12:55:40 +01:00
Marek Roszko
ea077bc34d Banish ignore.h to core 2023-04-18 22:44:04 -04:00
jean-pierre charras
e208685f85 DIALOG_SHIM: fix missing aEvent.Skip() in DIALOG_SHIM::onChildSetFocus().
This method was added in commit a914f6e9.
Missing Skip() created issues on Windows (text edit cursor not shown in dialogs)
2023-04-11 10:54:50 +02:00
Jeff Young
a914f6e992 First <ESC> after an edit in a textEdit cancels the edit.
(Second will exit the dialog.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14514
2023-04-10 15:13:43 +01:00
Mike Williams
b32ba16da4 UI: Add Numpad Enter as "Return" equivalent in missing places
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14244
2023-03-10 16:25:17 -05:00
Jeff Young
98d7b14dbc A better solution to keep SPICE netlist from being entirely selected.
Fixes https://gitlab.com/kicad/code/kicad/issues/14177
2023-03-06 18:46:01 +00:00
Marek Roszko
1edf84d756 More wxS ugh 2023-01-17 07:43:04 -05:00
Jeff Young
91dc79169a CLang-tidy. 2022-12-24 22:20:03 +00:00
Jeff Young
77998d7c51 Better fix for not selecting all of netlist. 2022-12-14 14:13:25 +00:00
dsa-t
01572c0f7d ADDED: Focus follows mouse between SCH and PCB editors (option). 2022-09-30 18:32:06 +00:00
Jeff Young
b4492e0bd2 More EDA_RECE yeetage. 2022-08-31 17:19:50 +01:00