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
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
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.
* 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
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
(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)
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
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
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
Note: while we try to omit sizing info from FBP files, the list
controls assume way too wide a minimum width if they're not set.
Furthermore, sizing the dialog ends up leaving them a certain size
and clipping other elements is the dialog itself doesn't have limits
set. Sigh.