Commit Graph

945 Commits

Author SHA1 Message Date
Jeff Young 16340e6cf4 Support both short and long item descriptions. 2024-06-28 22:10:22 +01:00
Jeff Young c549a214c9 Performance: don't alloc std::vector in critical areas.
For some history, see also aa2ad3b44c
2024-06-21 19:07:46 +01:00
Alex Shvartzkop ece46223c9 Fix shadowed/conflicting enum values. 2024-06-21 16:16:29 +03:00
Jeff Young ed0869aa0c Share more library tree code. 2024-06-08 19:06:10 +01:00
jean-pierre charras dc6b211227 better tool tips 2024-06-07 11:19:56 +02:00
dsa-t 34f0fb8f21 Revert "Don't reset the view controls state just because we are setting the already active tool state again"
This reverts commit e914c0c1a0

(cherry picked from commit 6b7b6fa3e3)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2024-06-04 18:03:41 +00:00
Alex Shvartzkop cf7ad330e9 Fix some platform ifdef checks. 2024-06-01 06:49:11 +03:00
Marek Roszko 132ecee665 Don't reset the view controls state just because we are setting the already active tool state again 2024-05-23 22:23:34 -04:00
Alex Shvartzkop 85f5b8849e Invalidate control sizes in ACTION_TOOLBAR. 2024-05-23 00:40:47 +03:00
Jeff Young e0e9321ea9 Consistency in command names.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17314
2024-05-15 13:50:42 +01:00
jean-pierre charras e51316a932 Fix a 100% CPU core usage is some editing cases.
In commit 7cb754dd a call to wxMilliSleep(50) was removed (because it created
lag in editing) but this removal created a 100% CPU core usage.
Using a much small sleep time (1ms) fixes these issues.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17979
2024-05-11 12:53:04 +02:00
Alex Shvartzkop 5475359d00 More build time optimizations. 2024-05-06 04:39:28 +03:00
Seth Hillbrand 416033e8e5 Ignore hidden text fields when cross-probing
Zoom-to-selection should only show the elements that we can see, so
avoiding hidden fields in footprints keeps the zoom window appropriately
sized

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15245
2024-05-02 10:57:25 -07:00
John Beard 129c61a742 SELECTION::GetItemsSortedByTypeAndXY - minor tweaks
Simplify a little by keeping the positions of A and B in
variables.

Also remove const when returning by value - all that does is
inhibit a (possible, NRVO) move if you assign the result to
a non-const vector.
2024-05-01 23:33:25 +08:00
Jeff Young a24eada8b1 Cleanup. 2024-04-28 13:52:41 +01:00
Alex Shvartzkop 16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Wayne Stambaugh 8a1347d2c8 Property grid navigation improvements.
* Do not handle tab key event when committing property changes so the
  property grid tab navigation works correctly.
* Do not call commit property changes on tab key when no changes are
  pending.
* Skip event handling in the base object value change and changing event
  handlers in case they do not get overloaded in derived objects.
* Do not force focus to canvas on property change so arrow and tab key
  grid navigation work properly.  Forcing the user to click the property
  grid control to edit a single property doesn't make sense.
* Pass properties panel show event up the event stack.
* Do not set focus to canvas in tool dispatcher if it already has the
  focus.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16957
2024-04-24 07:25:19 -04:00
Jeff Young e8be782687 Mostly clean-up, but also bug fixes with bounding boxes. 2024-04-22 11:16:14 +01:00
aris-kimi 66bb49e2da Silence some GCC warnings 2024-04-16 11:11:50 +00:00
Jon Evans 1dbe78c68b Add QA tests and expand serialization for API 2024-04-02 19:51:18 -04:00
Jon Evans f613cd1cb4 ADDED: A new IPC API based on protobuf and nng
Details, documentation, and language bindings are works in
progress and will be evolving over the course of KiCad 9
development.
2024-04-02 19:34:36 -04:00
Jeff Young 1152b0462c Grid properties for GerbView.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17372
2024-03-10 18:21:50 +00:00
ecorm 16de0a666c Horizontal/vertical zoom for Simulator plots
ADDED: Horizontal/vertical zoom for simulator plots, via mouse wheel,
toolbar buttons, menu commands, and hotkeys.

ADDED: Simulator preferences panel, populated with mouse wheel
and trackpad settings that control pan and zoom of simulator plots.

ADDED: Zoom In/Out Horizontally/Vertically commands that can be bound
to hotkeys.

CHANGED: Simulator plot scroll wheel gestures are no longer hard-coded
and can now be configured via the new Simulator preferences panel.

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

Other unreported bugs that were fixed:

- Fixed wierd, jumpy simulator plot view limiting behavior.

- Fixed Zoom In Center and Zoom Out Center commands not preserving
  the simulator plot center point.

- Fixed simulator plot nudging when exported as PNGs.

- Fixed rectangular selection zoom being able to exceed simulator plot
  view limits.

Notes:

- Provided new SIM_PREFERENCES struct to be used for future
  simulator preferences set via the simulator preferences dialog.

- Bundled pre-existing EESCHEMA_SETTINGS::SIMULATOR settings into
  EESCHEMA_SETTINGS::SIMULATOR::VIEW.

- Replaced mpWindow::EnableMouseWheelPan with more general
  SetMouseWheelActions.

- Refactored and tidied up wxMathPlot's mpWindow code involved with
  fitting, zooming, and panning.

- Consolidated long lists of duplicated member variable initializers to
  a new mpWindow private delegated constructor.

- Provided provisional Zoom In/Out Horizontally/Vertically toolbar
  icons that need improvement by a graphics designer.

- Provided gitignore entries for the Qt Creator IDE
2024-03-10 12:43:18 +00:00
Jeff Young 1082930c34 Don't steal command-keys from a wxGrid.
It's unlikely to win you friends.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17229
2024-03-02 15:28:22 +00:00
Jeff Young 48130c6982 The ruler tool is not part of InteractiveEdit.
(In particular, it should not return true to IsEditorTool().)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17164
2024-02-29 17:57:38 +00:00
Jon Evans 299b548a41 Trivial change to avoid crash on tool re-entry
See https://gitlab.com/kicad/code/kicad/-/issues/17164
2024-02-27 19:31:09 -05:00
Jon Evans 0df5cf7f75 Expose grid origin action in more places
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17007
2024-02-27 18:50:44 -05:00
Jeff Young 6ec51f6a69 Revert IsAttached() fix as it doesn't handle hotkeys from the main menubar.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17101
2024-02-25 15:46:12 +00:00
Jeff Young 0078ccea09 Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17086
2024-02-24 20:06:22 +00:00
Jeff Young fa0ead98d8 Split out table editing and table cell editing. 2024-02-24 20:05:51 +00:00
Jeff Young 6856e59374 ADDED: ExpandAll/CollapseAll for lib trees.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8243
2024-02-24 20:05:51 +00:00
Jeff Young e445249720 ADDED: PCB tables. 2024-02-24 20:05:51 +00:00
Jeff Young 4a9df1e18e ADDED: actions for left-, center-, and right-justifying text items.
(For both PCBNew and EESchema.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12375
2024-02-24 20:05:50 +00:00
Alex Shvartzkop 7cb754ddbb Remove 50ms delay seen in some actions, like duplicating schematic items.
(cherry picked from commit 339646a267)
2024-02-24 18:20:16 +03:00
Jeff Young ca3cd706e5 Show friendly name in toolbar button tooltips.
(Don't require the same text to be put into the tooltip.
It's error-prone and also disallows us from having a separate
tooltip for toolbar buttons.)

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

(cherry picked from commit f4a085575a)
2024-02-23 16:53:33 +01:00
Jeff Young e68cd04d48 Don't modify reference point if already moving.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16524

(cherry picked from commit 08da9a4494)
2024-02-23 16:53:32 +01:00
Jeff Young 73b6b19a4e Keep Mac debugger from crashing with breakpoints in .h files.
(cherry picked from commit 7446fba70a)
2024-02-23 16:53:32 +01:00
Ian McInerney b588001b95 Don't remember the menu in the tool dispatcher
Remembering the menu in the tool dispatcher can lead to stale pointers
if we never receive the required menu open or close events. Since wx
3.1.3, we get a valid menu object for all three events, so just forward
the event to that menu unconditionally if the menu is one of our
ACTION_MENUs.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16844
2024-02-11 23:24:18 +00:00
Jon Evans d6fb362bd1 Add attempted fix for Sonoma menu crashes
See https://gitlab.com/kicad/code/kicad/-/issues/16844#note_1767141019
2024-02-11 12:00:42 -05:00
Ian McInerney 9f66ddb27f Attempt to use IsAttached to identify if a menu is a menubar menu
We can't get a mouse position for a menubar menu's event, because the
mouse may be outside our canvas. The original hack to detect menubar
menus may not work fully, and there have been some crashes appearing on
macOS where menubar menus attempted to get mouse position information.

Instead of the hack, try using IsAttached() to detect if the menu is
attached to a menubar, and then gate mouse position access accordingly.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16738
2024-01-27 20:59:14 +00:00
Jeff Young 54b46c6968 Remove ineffective attempt to fix mac menubar crash. 2024-01-27 17:45:49 +00:00
Jeff Young 3fde08f711 Attempt to escape from MacOS menubar crashbug.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16738
2024-01-26 18:33:25 +00:00
Alex Shvartzkop 13f8fd77ac wx 3.3 compatibility. 2024-01-24 19:58:12 +03:00
Jeff Young 97cb15dd47 Make sub menus conditional on them having child items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16631
2024-01-18 00:21:15 +00:00
Jeff Young 455fae45d8 Support point editing of inverted rectangles.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16595
2024-01-17 15:27:48 +00:00
Jeff Young 169ece3b71 Try reusing the TOOL_DISPATCHER menu hack for libtree previews.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16493
2024-01-05 14:20:33 +00:00
Ian McInerney 5a5b7e0064 Stop clearing tool transitions when running tools
There doesn't seem to be a need to actually clear transitions for the
tools when running a handler. This clearing also prevents running
another nested handler from the same tool.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16449
2023-12-29 00:37:38 +00:00
Ian McInerney b6fffb3923 Add more tool stack tracing 2023-12-29 00:37:38 +00:00
Jeff Young 68cbb820a7 performance efficiencies 2023-12-18 17:20:34 +00:00
Wayne Stambaugh 9d6e9b14eb Fix action tool friendly name string capitalization. 2023-12-13 08:15:19 -05:00