wxCursor scale factors won't be supported before wx 3.3.
MSW doesn't scale cursors, so it works as expected there.
(cherry picked from commit e3e63fb1b8)
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
(cherry picked from commit 416033e8e5)
When using the button to select a footprint using the footprint chooser
dialog, the new footprint was not always taken in account (perhaps MSW specific).
It was due to the code to update the footprint name was between Disable() and
Enable, thus creating a loss of some events in the complex grid edition stuff.
This is now replaced by a lock flag to protect this code to be executed when
it should not.
From master branch
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18270
When loading schematics/pcbs, notification of font replacements might be
warranted but in libraries, this warning is not helpful and intrusive
(cherry picked from commit 11c6164934)
kimath overflow can generate thousands of unique messages in one run lolol
(cherry picked from commit acec5552c0)
Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
Also fixes a bug where the pattern assignment cache was not cleared
if all pattern assignments were deleted in the setup netclasses
panel.
Cherry-picked from 9e1a5eb1bd
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
Defer telling the statement about the connection until the
try block, because otherwise it can connect immediately and
potentially throw an exception if the connection fails.
We need the object in m_locale for a bit more things during program cleanup,
especially on macOS
The destructor of PGM_BASE is sufficient allowance of lifetime.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17369
(cherry picked from commit 9ffa5db667)
Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
* 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
manully cherry picked from commit 8a1347d2c8
The arraystring reference is lost when we don't keep the wxFileName
variable in scope.
This also adds removing invalid paths and checking for correct version
before sorting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17749
(cherry picked from commit d2701323a8)
Refactors `SHAPE_POLY_SET::fractureSingle()` to be more efficient, while
not changing the actual algorithm:
* increase cache locality by using contiguous arrays instead of what was
effectively a linked list
* reduce latency and jitter by replacing per-edge allocator calls with
ahead-of-time std::vector reserves
* increase cache efficiency by making the vertex struct smaller
* replace O(n^2) leftmost edge search with O(n log n) std::sort
* sort the polygons instead of the edges
* cut iteration count in half in the remaining O(polygons * edges) part
(cherry picked from commit e98c9f283f)
Logging is useful when we find an area that cannot be triangulated.
This will be used to generated test cases.
Skipping minor untesselated areas means that the polygon will still be
considered fully tesselated (and not sent back again and again) even if
the tesselation misses an area less than the configured limit.
Currently, this is 31^2nm.
(cherry picked from commit 7e7fec69f6)