Commit Graph

828 Commits

Author SHA1 Message Date
Jeff Young 87eb4401e3 Add Scintilla support to WX_GRID. 2023-02-21 13:32:01 +00:00
Marek Roszko c5a2c9c773 Try to prevent a crash in mpFXY::Plot
Fixes sentry kicad-c0
2023-02-19 00:38:42 -05:00
Jon Evans f7d59f2e89 Enable properties panel in footprint editor 2023-02-17 20:35:56 -05:00
Jon Evans e5b376721d Properties: remove assertion that no longer makes sense 2023-02-14 21:08:36 -05:00
Mike Williams d915cb780e Search Pane: add Activation (enter/double click) event support 2023-02-13 10:57:05 -05:00
Marek Roszko 4665823089 Turn on and fix MSVC compliance mode issues
We want /permissive- to enable debug performance improvements in MSVC 17.5+.
This flag is also default under C++20 so we'll have to deal with these compile issues anyway at some point in the future.

In particular, MSVC becomes pedantic about ternary types.
See https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170#ambiguous-conditional-operator-arguments

MSFT cites https://cplusplus.github.io/CWG/issues/1805.html
2023-02-12 16:30:37 -05:00
Jeff Young 1e756dbdd8 Save cursor positions in sim workbook. 2023-02-12 20:40:23 +00:00
Jeff Young e5176ff4d6 ADDED power dissipation plotting and cursors.
Also fixes a bug so that voltages, currents and power dissipations are
only probed if the flag is set -- this keeps ngspice from throwing an
error if you probe something twice (for instance, if you have .probe
commands in text and turn off the auto-probing).
2023-02-11 21:11:07 +00:00
Jeff Young 39d35a8bec Better cursor feedback for plot window. 2023-02-11 21:11:07 +00:00
Jeff Young f0bd25b397 ADDED use-settable simulation trace colors.
Fixes https://gitlab.com/kicad/code/kicad/issues/2536
2023-02-11 21:11:07 +00:00
Jon Evans 61dd4b7043 Properties: fix rebuilding when availability changes 2023-02-11 15:50:51 -05:00
Jon Evans eb240fda9a Properties: introduce validators; re-enable zone hatch settings 2023-02-11 11:44:58 -05:00
Jon Evans 769afa6fe6 Properties: refactoring 2023-01-24 12:08:37 -05:00
Jon Evans 890103a012 Properties: Fix handling of mixed value selections 2023-01-24 11:51:26 -05:00
Jon Evans 351f668645 Separate selection change updates from properties updates
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13624
2023-01-22 12:10:45 -05:00
Jon Evans 3a9ef02fdf Clean up handling of selection changes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13620
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13609
2023-01-21 17:37:29 -05:00
Jeff Young 3af9c658e6 Don't specify fonts in wxFormBuilder. It only leads to pain.
Fixes https://gitlab.com/kicad/code/kicad/issues/13547
2023-01-18 12:28:07 +00:00
Jeff Young 8ac0543a5e Try a bigger hammer to keep wxFormBuilder from messing up grid fonts.
Fixes https://gitlab.com/kicad/code/kicad/issues/13547
2023-01-17 13:41:53 +00:00
Marek Roszko d2c0f5fc2a More wxSing 2023-01-16 23:14:38 -05:00
Jeff Young 62649b868c Ensure good fonts in grid headers.
Also moves rendering to a flat look for headers (instead of a beveled
border).

Fixes https://gitlab.com/kicad/code/kicad/issues/13547
2023-01-16 02:47:14 +00:00
Seth Hillbrand fa91d906d0 Fix event blocker on GTK
We block events when a modal window is active.  But detecting when the
modal window is closed is harder on GTK than just counting modal closes
because the modal flag can sometimes be unset before the wxEVT_SHOW
event fires.  Instead, we track the stack of modal windows opened and
close the window and subsequent windows when the object pointer matches

Fixes https://gitlab.com/kicad/code/kicad/issues/13372
2023-01-12 11:53:00 -08:00
Jeff Young 30c9deb9d5 Flat(er) look for paged dialogs. 2023-01-11 01:11:25 +00:00
Wayne Stambaugh 9c0445ed98 Remove schematic editor standard dialog button static line separators. 2023-01-08 14:26:10 -05:00
Jeff Young 056349e5ea Units for footprint preview widgets. 2023-01-02 22:12:26 +00:00
Jeff Young 4c63b4e061 Class name <-> file name sync. 2022-12-29 18:05:57 +00:00
Jeff Young fc15454dd1 Debounce button control drawing.
Fixes https://gitlab.com/kicad/code/kicad/issues/13288
2022-12-27 23:55:28 +00:00
Jeff Young a18c2043c4 Minor adjustment for bitmap button size for GTK. 2022-12-26 23:13:22 +00:00
Jeff Young 340a8fb154 Default a library item selection if there is none.
Fixes https://gitlab.com/kicad/code/kicad/issues/13261
2022-12-26 14:11:46 +00:00
Jon Evans fbaf4af489 Properties: Allow dynamic update of read-only state 2022-12-25 20:35:44 -05:00
Jon Evans 4a0588db7a Properties: translation fixes 2022-12-22 17:45:16 -05:00
Jon Evans 1590e48ec1 Use translated strings for property display 2022-12-21 18:03:15 -05:00
Seth Hillbrand fcc4b202db Set interpolation/anti-alias in plots
This doesn't do much for Linux, but the interpolation modes for MSW and
Mac should clean up lines a bit in plotting

Fixes https://gitlab.com/kicad/code/kicad/issues/10239
2022-12-21 12:03:47 -08:00
Tanay Gupta b0cbab5c4b Footprint Editor: Focus search field when window is first opened
The search field on the Symbol Editor is focused when its window 
is first opened. Similar behavior has been implemented in the search
field of the Footprint Editor with this change.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13100
2022-12-20 19:54:02 +00:00
Jeff Young 9a8a25a596 Don't dismiss an infobar that isn't shown to start with.
On Mac (at least), we get a 1 second pause even if the bar wasn't shown.

Fixes https://gitlab.com/kicad/code/kicad/issues/13193
2022-12-18 10:55:37 +00:00
J RB 5f0d26cbe2 Remove argument to wxButton::GetDefaultSize on wxGTK-3.0.x
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13181
2022-12-16 22:40:37 +00:00
Jeff Young 0e2a4e3f15 Better handling of multi-monitor scaling. 2022-12-16 19:11:34 +00:00
Jeff Young 75a4de4744 Dim bitmap when button is disabled. 2022-12-16 01:22:50 +00:00
Jeff Young 355bfe1587 Blind attempt to fix MSW rendering bug. 2022-12-14 13:36:28 +00:00
Jeff Young c0872364d4 Get rid of bloated bitmap buttons on wxWidgets 3.2. 2022-12-13 20:48:02 +00:00
Jeff Young d3228dbab2 Differentiate search panel font between Mac and others.
Fixes https://gitlab.com/kicad/code/kicad/issues/13145
2022-12-13 00:47:19 +00: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
Jeff Young 4e47b5c25f Fix some layout and selection issues on Mac.
Some of these are due to moving to wxWidgets 3.2, but I'm not sure
all of them are.  In particular, the need for CallAfter() in the
search pane's selection handler is probably just a wxWidgets bug on
Mac (the control lies about the current selection inside the event
handler).

Also sets better column widths in the search pane.
2022-12-11 00:56:46 +00:00
Jon Evans 2b0d7f65d0 Properties: sync wxPGGlobalVars map state with editor global state
Thanks to @dsa-t for suggesting this

(maybe)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12297
2022-12-08 07:55:57 -05:00
Jon Evans 435651237c Properties: Support overridden availability functions 2022-12-08 00:09:51 -05:00
Jon Evans 33d76f63b0 Properties: save and restore splitter position 2022-12-07 21:38:33 -05:00
Jon Evans ad8e5891d2 Properties: update evaluator locale when creating editors 2022-12-06 17:56:33 -05:00
Jon Evans d435ba6485 Properties: improve handling of enter/return 2022-12-06 09:10:59 -05:00
Jon Evans 1a0c774940 Properties: Space to toggle booleans; fix arrow keys 2022-12-06 08:56:13 -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 74fa88c0f6 Defer splitter calculation until next event
Windows doesn't have valid sizes in the size event

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13019
2022-12-06 08:05:28 -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 f6822120b3 Enable tab and return commit in property grid. 2022-12-04 11:51:44 +00: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 8f39dd69be Properties: fix caption text in dark mode on GTK 2022-12-02 22:43:11 -05: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 12b7e68703 Properties: Skipped group should not assert
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13028
2022-11-29 18:12:28 -05:00
Jon Evans b2b3f5752f Properties: Add grouping and sorting by creation order 2022-11-27 22:40:23 -05:00
Jon Evans 5bbe21f540 Properties: don't rebuild the panel when closing an editor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12984
2022-11-27 14:29:16 -05:00
Jon Evans 96fe93618e Properties: Stop sorting by name
It's more useful to have properties shown in add order,
since we can group them
2022-11-25 16:29:56 -05:00
Jon Evans 5061f0556f Properties: implement ellipsization for name column 2022-11-25 12:37:47 -05:00
Jon Evans 220ef6fb44 Properties: Add some missing footprint properties; cleanup
Add concept of "internal" properties that will be accessible from
Python/DRC but not shown in the Properties Manager
2022-11-25 12:37:47 -05:00
Jon Evans 696a1cd39d Properties: improve handling of column splitter 2022-11-25 09:58: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
Jeff Young 93c6d99a6d Move saving preferences out of the destructor.
For other reasons we wrap the adapters in a wxDataObject, which has
delayed destruction semantics, but that means the settings stuff may
no longer be around when the d'tor executes.

Fixes https://gitlab.com/kicad/code/kicad/issues/12371
2022-11-14 20:01:37 +00:00
jean-pierre charras 9501f4303d Rename CreateWindow to CreateKiWindow to avoid a collision name with a windows header
No code change, but it fix an issue specific to msys2 that bother me when
trying to fix issues with wx 3.0.x version
2022-11-08 12:31:07 +01: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 b385a4b60a Implement DarkMode for the Appearances Palette.
Fixes https://gitlab.com/kicad/code/kicad/issues/11734
2022-11-06 00:34:45 +00:00
Jeff Young cf581137d8 Handle multiple unitProviders in a WX_GRID.
This allows us to provide a more consistent and less buggy presentation
of the netclasses grid in both eeschema and pcbnew.

Fixes https://gitlab.com/kicad/code/kicad/issues/12826
2022-11-05 10:23:12 +00:00
Jon Evans a5d685ff5c Handle coordinate transforms in properties system
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12320
2022-10-31 23:01:52 -04:00
Marek Roszko c0f8810759 Don't fix the visibility icon size or it will never scale properly
Related https://gitlab.com/kicad/code/kicad/-/issues/11880
2022-10-30 15:03:00 -04:00
Jeff Young fb8493d0bc Move model pin editor to GRID_CELL_ICON_TEXT_POPUP.
wxChoice is hopeless on Mac (it still doesn't highlight on rollover),
and using a char for the "assigned" graphic isn't great.
2022-10-28 15:27:00 +01:00
Jeff Young 58ac62d493 Return cursor to arrow when leaving search ctrl.
Fixes https://gitlab.com/kicad/code/kicad/issues/12764
2022-10-27 16:27:19 +01:00
Jeff Young c8261d13a5 Better platform fidelity on Mac for SPLIT_BUTTON. 2022-10-24 00:14:12 +01:00
Jeff Young 064e7f0f2c Dark mode hacks for SPLIT_BUTTON on OSX. 2022-10-23 17:56:44 +01: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
Seth Hillbrand b716afd6f1 Clarify various uses of "Center"
Distinguish between the english verb "Center" and the noun "Center",
which may be translated differently

Fixes https://gitlab.com/kicad/code/kicad/issues/11109
2022-10-03 12:48:57 -07:00
Jeff Young 01e6491046 Fix side-effect of multi-select in lib trees. 2022-10-03 19:11:31 +01:00
Jeff Young 230762053d Translate mod flags between wx and Kicad.
Also we have to use wxEVT_CHAR_HOOK instead of wxEVT_CHAR or up/down
end up getting handed to COMMON_TOOLS.

Fixes https://gitlab.com/kicad/code/kicad/issues/11034
2022-10-03 18:42:50 +01:00
Jeff Young 2422b9a7c8 Simplification, formatting, and spelling. 2022-10-03 18:42:50 +01:00
Jeff Young e335c1c612 Fix for LIB_TREE hotkeys over canvas and possible fix for over LIB_TREE itself.
Fixes https://gitlab.com/kicad/code/kicad/issues/11034
2022-10-02 22:22:21 +01:00
Jeff Young c0a666507c Work around more instances of the wxWidgets color string locale bug.
Fixes https://gitlab.com/kicad/code/kicad/issues/12552
2022-09-30 20:56:25 +01:00
Jeff Young f2de3e9f67 Minor cleanup. 2022-09-30 13:02:08 +01:00
Marek Roszko 46471247ff Some header cleanup 2022-09-27 23:25:20 -04:00
Marek Roszko 21c1c97bf3 Unbind search pane listview events on destruction to avoid event race 2022-09-27 19:16:29 -04:00
Jon Evans 375b530dad ADDED: Column selection and reordering in symbol chooser 2022-09-25 22:49:49 -04:00
jean-pierre charras 28165c6a31 SEARCH_PANE_TAB: fix a typo and add missing event handler. 2022-09-25 16:40:08 +02:00
Jeff Young 659a6e5b04 Replace macHack as its requirement sadly never went away. 2022-09-24 23:50:45 +01:00
Jon Evans dcfcfd5f29 Don't run context menu actions when clicking outside the menu 2022-09-23 23:44:08 -04:00
jean-pierre charras c44e54756a search panel: fix a crash and a refresh issue after selecting a second item
at least on W10/msys2
2022-09-21 19:36:35 +02:00
Jeff Young 8eb68ee472 Add pin/unpin context menu to Symbol Chooser and Footprint Chooser.
Also moves some more code down into common so it can be shared.

Fixes https://gitlab.com/kicad/code/kicad/issues/12384
2022-09-21 14:45:12 +01:00