7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-18 00:29:10 +00:00
Commit Graph

283 Commits

Author SHA1 Message Date
Jeff Young
877c6bce89 Printing is not zoom-specific.
(Some of these items don't currently get printed, but
there's no sense in leaving a latent bug around in case
we ever change our minds.)
2025-03-07 13:01:00 +00:00
Sam Schweigel
373d9c9281 Disable touch events on OSX only, allowing them on GTK and Windows
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14374
2025-01-09 23:00:53 +00:00
Wayne Stambaugh
89db935910 Housekeeping in include path sub-folders. 2025-01-04 09:21:11 -05:00
John Beard
520a7cf62c GAL: ViewGetLOD should not be able to change the VIEW
Make the VIEW* parameter const. Since PCB_TEXT does a null-check,
it's not very clear if this can ever be null (and if it is,
why don't the other VIEW_ITEMs check?), so don't make them
all references too at this time.

Also dereference a few pointers a bit earlier to make non-null
promises sooner rather than later.
2025-01-02 22:59:31 +08:00
John Beard
527faddbfd GAL: provide constants for LoD HIDE/SHOW and a scale helper
Saves a mishmash of local HIDE/SHOW defs along with various literals.

Also provide a function that computes the scale at which a given
IU size becomes (notionally) a certain size on screen. While this
is a simple division, it's a bit opaque in terms of meaning.

Also it means the divide by zero case can be more universally
defended-against, which has traditionally been a bug opportunity.
2025-01-02 22:59:31 +08:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
jean-pierre charras
2cd28009ef Define MAX_LAYERS_FOR_VIEW to init GAL::Mxx_DEPTH and VIEW_MAX_LAYERS
These values MIN_DEPTH, MAX_DEPTH and VIEW_MAX_LAYERS are coupled, so to
avoid mismatch, it is better to derive these values from an unique value
2024-12-30 16:59:32 +01:00
jean-pierre charras
cb70079f86 GAL_API::VIEW::VIEW_MAX_LAYERS: increase value from 512 to 1024.
It was needed by the commit 78f83b5a that added GAL layers to the list.
2024-12-30 08:40:45 +01:00
Jon Evans
c77426cc12 Fix a few issues with via and pad rendering
The refactor of VIEW::SortLayers broke it, but this
was hard to notice until my recent changes.
2024-12-28 12:42:52 -05:00
Seth Hillbrand
d7137c4a05 Cleanup VIEW class
Ununsed m_dynamic class variable
2024-11-21 18:59:48 -08:00
Seth Hillbrand
76176274cf Improve function naming
Having sortLayers and SortLayers in the same class was confusing.  Also
removed the asserting calls in view updates
2024-11-21 18:04:23 -08:00
Seth Hillbrand
9c08354485 More VIEW refactoring
Move m_layers into map, add layer existence checks.  Skip layer sorting
overhead for OpenGL display b/c we use z-level for it anyway
2024-11-21 15:41:56 -08:00
Seth Hillbrand
9dfcb6a362 Cleanup ViewGetLayers()
Old style c-array replaced with vector returns
2024-11-21 13:18:36 -08:00
Mike Williams
53022ab347 mouse settings: add reverse zoom option
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18583
2024-09-23 17:09:44 +00:00
Jeff Young
94f995c49e Reduce dependency on dynamic_cast.
(Especially where it is no-worky on MacOS.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17245
2024-09-04 17:24:49 +01:00
Seth Hillbrand
a724b3d8b1 Handle DXF files with out of bounds values
First, ensure that we calculate the bbox of the imported elements.

If the total BBOX is outside our allowed value, refused to import.  This
needs to be scaled or addressed in an external editor

If the bbox fits, then make sure that we clamp it such that the largest
element is still within our bounds

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18523
2024-08-14 13:06:18 -07:00
Jeff Young
7fef6e8d83 Use view's RTree for redrawing netnames. 2024-06-14 00:20:37 +01:00
Alex Shvartzkop
8f8a68229c Handle touchscreen gesture events for zoom/pan. 2024-06-08 16:00:34 +03:00
Alex Shvartzkop
5475359d00 More build time optimizations. 2024-05-06 04:39:28 +03: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
Jeff Young
ef23d6776d Formatting.
(cherry picked from commit baaed8ed84)
2024-02-23 16:53:32 +01: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
jean-pierre charras
6f9affe3db Fix compil warnings: disable #pragma specific to MSVC 2023-09-27 08:22:39 +02:00
Marek Roszko
4746bde4b3 gal as a shared lib, gaasl! 2023-09-26 22:31:31 -04:00
Marek Roszko
7010f7963c EDA_ITEM does not belong in VIEW 2023-09-25 19:30:42 -04:00
Marek Roszko
22b733209d Fail GAL on its header leaking audit
Maybe we should rethink directly accessing GAL so much, but at least 600 files didn't need GAL leaked into them due to view_overlay.h
2023-09-18 19:52:27 -04: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
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
jean-pierre charras
1406341d2d Fix a few doxygen errors (no actual code change) 2023-04-19 16:20:24 +02: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
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
Alex
c1ea90abc6 Handle view centering properly when drag-panning and zooming. 2023-01-02 14:20:43 +05:00
Jeff Young
96819f6c01 Better cache invalidation for text objects with references.
Fixes https://gitlab.com/kicad/code/kicad/issues/13059
2022-12-04 11:51:44 +00:00
Seth Hillbrand
4f6b853756 Don't use modifiers when moving with keyboard
The modifier keys on the keyboard control the motion spacing (Ctrl) and
shouldn't be confused with the modifier key used to disable grid
snapping when moving with the mouse (also Ctrl)

Fixes https://gitlab.com/kicad/code/kicad/issues/13027
2022-11-28 11:05:12 -08:00
Bevan Weiss
4f634d7df7 Updated accelerating zoom controller to use default (non-accelerated)
zoom if changing direction.

Signed-off-by: Bevan Weiss <bevan.weiss@gmail.com>
2022-11-04 16:28:32 +00:00
dsa-t
01572c0f7d ADDED: Focus follows mouse between SCH and PCB editors (option). 2022-09-30 18:32:06 +00:00
Marek Roszko
89310bc403 "Cleaner" pan fix and add internal setter on state 2022-09-07 07:19:39 -04:00
Mike Williams
99f8b21ed1 PCB: Add bitmap layer per board layer 2022-07-14 11:23:23 +00:00
Jeff Young
23fb4c7433 Uniformly use a single facility for location-less prime events.
Also implements a uniform mechanism for avoiding auto-scroll after
a prime event or dialog which results in a mouse position at the
edge of the canvas.

Fixes https://gitlab.com/kicad/code/kicad/issues/11057
2022-05-16 23:43:00 +01:00
dsa-t
68655540eb Clamp cursor to limits of coordinates representation
Also improves large distance handling.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8846
2022-02-11 16:42:52 +00:00
markus-bonk
47603fbc76 Wx_view_controls: Allow two input devices to simultaneously pan & zoom
Instead of the mouse move and zoom algorithms calculating the new
position or scale values relative to a starting value, the new values
are calculated relative to the current values. This allows the user to
use a second input device to move or zoom the view at the same time
without its change being undone by the mouse.
2022-01-28 12:21:42 +00:00
Jeff Young
e84c574830 Some more EDA_ANGLE cleanup. 2022-01-16 19:16:18 +00:00
Jeff Young
8f7d2dd06a More VECTOR2D -> VECTOR2I and wxPoint cleanup. 2022-01-11 14:20:14 +00:00
Jeff Young
58d4ac2a97 Keep netnames on tracks within the viewport when possible.
Fixes https://gitlab.com/kicad/code/kicad/issues/2032
2021-12-24 17:11:01 +00:00
Jeff Young
a48867ea01 Solder mask integrity testing.
ADDED DRC test for solder mask aperture bridging copper from different
nets.
ADDED visualization of minimum web width processing for solder masks.
ADDED allow_soldermask_bridges property for footprints.

Fixes https://gitlab.com/kicad/code/kicad/issues/2183

Fixes https://gitlab.com/kicad/code/kicad/issues/1792
2021-12-23 22:31:14 +00:00
Jon Evans
014bad7b28 Add profile counters for PCB mouse and paint events 2021-12-05 15:16:08 -05:00
PJM
f3b3d18319 Removed dead code from view_controls.h
CHANGED: Removed "ForcedCursorPosition()" and "IsCursorPositionForced()"
from view_controls.h.  First, these functions are completely redundant
as they do the exact same thing but have different names.  Second,
neither is called anywhere in the entire KiCad code base.
2021-11-25 12:55:18 +00:00
Jeff Young
930c4e5582 Cleanup.
Formatting.
Naming conventions.
Use of auto.
Use of STL cover types.
2021-10-03 19:42:29 +01:00