Commit Graph

118 Commits

Author SHA1 Message Date
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
Jeff Young 6f49b57f9b Cleanup & performance enhancements. 2022-08-01 13:09:51 +01:00
Seth Hillbrand 93fb00d815 Protect the Kiway dereference
Also find a few more places where we are reaching into a new frame to
perform actions that need to have dialogs closed.

Running actions should also wait for the next cycle rather than being
immediately executed when we are calling into a new frame.  This allow
for the cleanup actions onClose() to happen prior to the next action
starting

Fixes https://gitlab.com/kicad/code/kicad/issues/11891
2022-07-14 11:37:45 -07:00
Seth Hillbrand b5bf1da251 Keep track of blocking windows
Allows the calling KiWAY player to send messages to the blocking window
before signaling a separate call

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

Fixes https://gitlab.com/kicad/code/kicad/issues/11772
2022-07-13 19:25:24 -07:00
Jeff Young b9eb3e9b05 Be more explicit about string conversions. 2022-02-03 23:07:41 +00:00
Jeff Young c3552a940a Make sure standard OK/Cancel buttons respond to current language.
Fixes https://gitlab.com/kicad/code/kicad/issues/9635
2021-12-24 18:13:11 +00:00
Seth Hillbrand 4b5c010e63 Standardize asterix at the beginning of title
This is how the unsaved state is presented in Editor Frames (for
better/worse) so we should be consistent
2021-10-25 09:36:23 -07:00
Jeff Young c52cb229d0 Add unsaved-changes indication to Symbol Properties.
Fixes https://gitlab.com/kicad/code/kicad/issues/9443
2021-10-25 12:35:04 +01:00
Seth Hillbrand 548e5f49bd Clean up unused variable usage
Unused variables in function calls can be commented out.  Unused
return variables get a new routine `ignore_unused()` that silences the
warnings with zero overhead.
2021-10-05 10:00:30 -07:00
Jeff Young 3a5d49f7b2 Make select-all hack work with Scintilla too.
Fixes https://gitlab.com/kicad/code/kicad/issues/8876
2021-07-28 00:16:18 +01:00
jean-pierre charras 1aadf45947 DIALOG_SHIM: fix not working initial size when creating a dialog.
The first time a DIALOG_SHIM was created, with a given size, this size
was not taken in account. This this is now forced.
(when recreated during a session, this is the last dialog size that is used)
2021-07-24 18:59:28 +02:00
Jeff Young 8631d670a4 Don't selectall in GTK text boxes.
It's not clear that it's normal platform behaviour, and some GTK
window managers fail to non draw the selection in inactive text
boxes.

Fixes https://gitlab.com/kicad/code/kicad/issues/8197
2021-06-20 21:37:02 +01:00
Marek Roszko 564826feae Use wxRect in dialog_shim rather than eda_rect for purely gui logic 2021-06-03 21:11:08 -04:00
Marek Roszko 7faee5eda5 Stop salt the eart with wxhtml.h 2021-06-03 07:49:49 -04:00
Ian McInerney ecd9bf696e Be consistent about using nullptr instead of 0
0 can be too easily overloaded into an int, so ensure we use nullptr
when we mean pointers.
2021-04-22 22:20:34 +01:00
jean-pierre charras 5d2dc0b50e Fix a few (minor) issues:
- Make DIALOG_SHIM::SetPosition working)
- rename PCB_BASE_FRAME::SelectLayer() to PCB_BASE_FRAME::SelectOneLayer()
- PCB_BASE_FRAME::SelectOneLayer(): make dismiss dialog by escape key working.
Fixes #7578
https://gitlab.com/kicad/code/kicad/issues/7578
2021-02-17 20:56:43 +01:00
jean-pierre charras bf332b3189 Fix minor compil warnings 2021-01-07 20:55:24 +01:00
Jeff Young f372c8025b Better sizing for some conditional dialogs.
These dialogs don't have growable features but do have conditional
features, so the size is better adjusted automatically by the code
then by the user.
2021-01-07 01:27:12 +00:00
Jeff Young 3e6b658b92 Use stronger language when talking to wx. 2020-12-06 14:57:26 +00:00
Jeff Young fc2bdc49de Once more into the depths of hell... er, I mean fix a focus issue.
So the new steals-focus protection stuff works well when there's a
focused control, but not as well when there's a modal dialog up which
happens not to have a focused control (or worse, a focusable control).

This adds a second mechanism for also checking to see if a modal dialog
is up (something that wxWidgets, true to form, makes very difficult).

Fixes https://gitlab.com/kicad/code/kicad/issues/6520
2020-11-26 16:47:40 +00:00
Jeff Young 94de8ada97 Formatting and naming conventions. 2020-11-26 16:47:40 +00:00
Werni 0e44f5128c Add const specifiers 2020-11-18 19:50:36 +00:00
Jeff Young a207bd97bb Naming conventions. 2020-11-17 16:05:49 +00:00
Jeff Young 1aaa690eb5 Remove errant extra include. 2020-11-13 18:10:41 +00:00
Jeff Young bfe750f88a Temp hack for square looking buttons on OSX. 2020-11-13 17:55:54 +00:00
Marek Roszko 6fa8ebab85 Remove the auto centering of dialog_shims as a experiment
Windows handles default positions better such as remembering the last position if we don't start centering it unconditionally

Fix #6032
2020-10-18 12:34:24 -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
Wayne Stambaugh ede39780e2 Remove all debugging output that cannot be disabled.
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.

There is still some debugging output in test code that really needs to
be moved into a unit test.

Add debugging output section to the coding policy regarding debugging
output.
2020-08-18 10:17:36 -04:00
Simon Richter c407e96b14 std::min/std::max requires <algorithm> 2020-07-11 15:46:57 +02:00
Jeff Young 5ee806c3a3 The dispatch-behind & whitelist stuff got broken again, so I've
retired them in favour of a much dumber hack that special-cases
only ctrl-U for units switch.
2020-06-24 12:22:42 +01:00
Jeff Young 0ddf53397f Make sure CvPcb gets its Cancel button fixed up.
It's no longer a DIALOG_SHIM so it can't depend on its fixup.

Fixes https://gitlab.com/kicad/code/kicad/issues/4611
2020-06-04 22:35:01 +01:00
Ian McInerney a843c74529 Add new kiplatform library for platform-specific code
* Implement ReparentQuasiModal for OSX natively
* Implement ForceFocus of OSX natively

This change means we no longer rely on the kicad-specific functions in our osx wx fork.
2020-06-03 14:58:54 +00:00