Commit Graph

433 Commits

Author SHA1 Message Date
Jeff Young 7fef6e8d83 Use view's RTree for redrawing netnames. 2024-06-14 00:20:37 +01:00
Jon Evans 74517856ca Make touchscreen events Windows-only
They break things on macOS and probably also on GTK
according to the wxWidgets documentation.
2024-06-09 13:18:32 -04:00
Alex Shvartzkop 7bca6cdea7 Make crosshair follow view movement when using pan/zoom gestures. 2024-06-09 18:46:42 +03:00
Alex Shvartzkop 832393b07c Remove debug line. 2024-06-08 17:25:49 +03:00
Alex Shvartzkop 8f8a68229c Handle touchscreen gesture events for zoom/pan. 2024-06-08 16:00:34 +03:00
Marek Roszko e9fde0051f Don't let CaptureCursor fight modal dialog 2024-05-24 18:57:24 -04:00
John Beard ce758adca3 Enable horizontal scroll panning
Allow a horizontal scroll event to fall through to the panning branch.

This still restricts zooming to use only the vertical axis, but it
(re-?)enables the horizontal pan function that currently doesn't work
even if the user has set "allow horizontal panning", as the horizontal
scroll doesn't have a modifier, which is the default for vertical scroll
zoom, and thus it skips over the whole panning branch.

If the user has not set horizontal panning, the earlier early return
means that there is no handling of any horizontal scroll event, so this
won't change anything for these users.
2024-05-20 19:23:23 +08:00
Alex Shvartzkop 865e3a9f3c Improvements when working closer to 32-bit integer limits.
- Changes BOX2 size to extended coordinates.
- Adds BOX2ISafe to construct a BOX2I that will fit in int32.
- Adds more checks.
- Safer computations.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17670
2024-04-23 16:34:07 +00:00
Marek Roszko b2115445cc Make screenCenter a VECTOR2D for now to silence c++ 20 build error 2024-04-12 21:55:19 -04:00
Jeff Young b285545aee Don't take too long worrying about very small exposed areas.
(And in particular, don't take forever if the min / 10 results
in step being 0.)
2024-03-21 18:14:29 +00:00
Alex Shvartzkop 463b609993 Disable infinite panning when using XWayland.
Cursor warping doesn't work properly in this scenario.

https://gitlab.com/kicad/code/kicad/-/issues/14109
2024-03-12 10:31:23 +03:00
Yon Uriarte 464f185387 Performance
Cache VIEW_ITEM's bbox in VIEW_TREE for faster removals.

Fixes https://gitlab.com/kicad/code/kicad/issues/16841
2024-03-02 00:03:46 +00:00
jean-pierre charras 9c05b61d7b VIEW::ReorderLayerData(): fix an issue that creates crash in Gerbview
Fixes #16558
https://gitlab.com/kicad/code/kicad/-/issues/16558
2024-01-09 15:13:57 +01:00
Jeff Young d05675f673 Minor performance wins. 2024-01-04 16:26:32 +00:00
Ian McInerney e6632bb983 Rename PCB IO classes/files 2023-12-24 01:22:21 +00:00
Jon Evans 1c895fe18c Improve rendering of tuning status popup
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16304

Add dedicated UI rendering layers

Switch to screen-space rendering to avoid blurriness

Fix a bug in OpenGL GAL that causes layer
ordering to be broken when using Scale

Fix some issues with VIEW_GROUP layer ordering
2023-12-19 22:38:21 -05:00
Seth Hillbrand 6633eadfc8 Enclose wxCHECK* macros in braces
The macros are if/else statements without enclosing structures which
leads to unexpected evaluation when expanding in an existing conditional
that does not have braces already.
2023-10-29 10:52:05 -07:00
Jeff Young 87621817bf Fix typo. 2023-10-14 18:22:17 +01:00
Jeff Young 5f5113c80a Pick up current rule values when editing meanders. 2023-10-14 15:04:18 +01:00
Alex Shvartzkop d7863b09c5 Move CORNER_STRATEGY out of SHAPE_POLY_SET. 2023-10-06 15:42:50 +03:00
jean-pierre charras c2db20d745 Fix a link issue on mingw in debug mode. 2023-09-30 16:08:54 +02:00
jean-pierre charras e1d7d1bca7 Fix a link issue on mingw/msys2 2023-09-27 10:20:18 +02:00
Marek Roszko 7010f7963c EDA_ITEM does not belong in VIEW 2023-09-25 19:30:42 -04:00
Marek Roszko f8e33be07f Break out the boundary violating parts of gal into common through subclassing 2023-09-23 09:37:47 -04:00
Alex Shvartzkop 3ee2086f95 Don't freak out when can't warp the pointer. 2023-09-22 05:10:42 +03:00
jean-pierre charras e152f97f35 Fix minor Coverity warnings. Small code cleaning in pcb_parser.cpp 2023-09-21 11:33:29 +02:00
Alex Shvartzkop 768d4a6782 Wayland: fix cursor warping on KDE and Weston, add logging. 2023-09-18 12:56:54 +00:00
Alex Shvartzkop 06463fd35a Fixes for Wayland cursor warping:
- Emulate the mouse position, since no motion events are sent after warp
- Do not call wl_surface_commit to prevent an assert
- Re-organize code a bit
2023-09-18 12:56:54 +00:00
Clément Saccoccio ad62b165fe Fixed infinite mouse-drag with fast movement on Wayland. 2023-09-18 12:56:54 +00:00
Marek Roszko 7505fd0f37 Profile can live in core 2023-09-07 07:47:01 -04:00
Marek Roszko 67b031adab Painter base class should just live in gal instead of being in denial 2023-09-06 20:23:19 -04:00
Josue Huaroto a8e18e2d8c
Flip Viewport when Flip board is enabled 2023-09-03 12:30:32 +00:00
Seth Hillbrand db8e15ce88 Require wxWidgets 3.2
Removes old defines and work arounds for earlier wx versions and adds a
CMake requirement to use at least 3.2 (or the minimum matching wxPython
version)
2023-08-23 22:02:56 +00:00
Alex Shvartzkop 10e2e4a12d Another try at fixing arcs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15471
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15469
2023-08-22 16:10:58 +03:00
Jeff Young 988a90d5ee Ignore LOD scale for selections, but not things explicitly hidden.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15215
2023-08-18 12:35:32 +01:00
Rastersoft 5936960c1e Allow to reverse the mouse wheel movement
This MR adds a CheckBox in the preferences window to reverse the
horizontal pan direction
2023-08-17 19:17:50 +00:00
Rastersoft 43fe1eec84 Unify mouse movements 2023-08-17 18:20:22 +00:00
Jeff Young c697a934b2 Update layer names to current terminology.
Also fixes some out-of-date tooltips/names.
2023-08-04 11:37:46 +01:00
mitxela 12be115c78 Prevent horizontal scrolling while zoom modifier is held 2023-07-10 19:37:46 +00:00
Alex Shvartzkop 7b5e725b98 Improve GAL panel refresh logic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15041
2023-07-03 02:15:05 +03:00
Ian McInerney 8b8586f54b Add case to ignore the unused scroll events in the view framework 2023-06-29 23:21:15 +01:00
Jeff Young f5791f5dc6 Left some fixes out of previous commit. 2023-05-29 16:22:24 +01:00
Jeff Young f72cc6dd51 Amend overly aggressive assert. 2023-04-18 17:31:22 +01:00
Jeff Young 6f59740953 Tighten up the lifecycle management of VIEW_ITEMs in
general, and the SYMBOL_VIEWER_FRAME's m_previewItem in
particular.

(Attempted fix for Sentry KICAD-G1.)
2023-04-16 14:21:23 +01:00
Marek Roszko bfad8bb0d5 Prevent VIEW::UpdateItems and onShowTimer from firing repaints if GAL did not complete init
This appears to be a possible event race on startup

Fixes sentry KICAD-10A
2023-04-11 22:09:05 -04:00
qu1ck a6d10c8e97 Enable warnings on msvc 2023-04-11 00:17:50 +00:00
Seth Hillbrand 0b54eb6edb Backout change unrelated to 19d0aceda3 2023-03-24 12:28:03 -07:00
Seth Hillbrand 19d0aceda3 Remove superfluous m_status variable
This used to be used to store information for the item similar to
m_state but it has been deprecated and no uses remained
2023-03-24 09:38:39 -07:00
Jeff Young 99247adf15 Fix uninitialized variable. 2023-03-12 12:56:12 +00:00
Jeff Young c9351dfd67 Drawing improvements for symbol & footprint diffs.
Moves forced-transparency setting down into VIEW_ITEM so that it can
be used to place forced-transparent objects in a different target.
This keeps EnableDepthTest() from equalizing the alpha values between
the two symbols (or two footprints).
2023-03-11 12:45:16 +00:00