123 Commits

Author SHA1 Message Date
Mike Williams
36ee61dfe4 schematic: prevent crash in symbol browser with no grids 2025-08-20 15:20:13 -04:00
Jeff Young
6541202d42 Repair COMMON_TOOLS to know about frame-specific WINDOW_SETTINGS
Remove the older architectures for ensuring non-empty
grids and zooms

Move new architecture to PARAM_LIST::Load,
and add zoom support

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21318
2025-07-15 15:24:11 +01:00
aris-kimi
0cf866d4fb Inline static bool Fp/3Dmode members to remember panel layout
Layout is remembered for Schematic/Symbol Editors and Footprint Chooser frames until KiCad restarts

Also Added a new button toggle to show/hide the description panel with some new images too


Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17610
2025-05-20 16:16:01 -07:00
jean-pierre charras
34e49758d0 Footprint chooser frame: fix crash in COMMON_TOOLS::ResetLocalCoords()
The crash was due to a null pointer thta can happens in Footprint chooser,
frame, when hit the space bar if the canvas showing the Fp has the focus.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20780
2025-04-26 18:19:05 +02:00
jean-pierre charras
f8ec23db00 WX_PT_ENTRY_DIALOG: enhancements: fix min size and add reset button.
It is used to enter a point position and a grid origin.
The new button (only in grid origin dialog) allows reset the position.
2025-04-03 13:19:20 +02:00
jean-pierre charras
eaa1e6d594 Fix a collision with a Windows define and our use of the same var name.
We use IN for INCH as units, but IN is defined in a Windows header
2025-03-02 11:34:30 +01:00
Jeff Young
f951497a4f Code brevity. 2025-03-01 21:58:31 +00:00
Wayne Stambaugh
e09b095533 Common folder housekeeping part 3. 2025-01-16 11:50:08 -05: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
John Beard
c6f7fa9b6e Add a zoom/pan-to-selection actions
This is useful is some process ends up doing sometihng
offcreen and wants to show you.
2024-11-02 03:09:52 +08:00
John Beard
4bad76825c Standardise clamp function
std::clamp and alg:clamp had different argument orders.
Since std::clamp is constexpr, we might as well just use
that now we have it.
2024-10-09 21:27:58 -06:00
Jeff Young
3441861988 Make arrow keys respect grid overrides. 2024-08-28 19:54:23 +01:00
Seth Hillbrand
c0bf866c58 Speed up shutdown
When shutting down, we shouldn't need to do a lot of things like
resyncing the PNS world multiple times that can really slow down the
process
2024-07-05 11:16:20 -07: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
jean-pierre charras
d4ce2c8982 Fix a few Coverity warnings. 2023-11-25 11:44:01 +01:00
Jeff Young
974da4ea7c Push most of DIALOG_CHOOSE_SYMBOL down into PANEL_SYMBOL_CHOOSER.
Includes a dialog wrapper (DIALOG_SYMBOL_CHOOSER) and a frame
wrapper (SYMBOL_CHOOSER_FRAME).
2023-09-29 00:13:12 +01:00
Jeff Young
1047130046 Push most of footprint chooser into PANEL_FOOTPRINT_CHOOSER.
Create 2 wrappers for it: DIALOG_FOOTPRINT_CHOOSER and
FOOTPRINT_CHOOSER_FRAME.  The first now gets called from wxGrid
editors, text button editors (such as Change Footprints), etc.

Retire FOOTPRINT_VIEWER_FRAME_MODAL.  FOOTPRINT_VIEWER_FRAME still
exists, but has very few uses at this point.
2023-09-27 16:02:13 +01:00
Marek Roszko
f8e33be07f Break out the boundary violating parts of gal into common through subclassing 2023-09-23 09:37:47 -04:00
Jeff Young
93a5d01230 Unroll ACTIONS::CURSOR_EVENT_TYPE into a flat enum.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15666
2023-09-18 12:38:34 +01: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
91d8dabca3
Change behavior of ZOOM_FIT_ALL and ZOOM_FIT_OBJECTS for PCB_EDITOR 2023-09-03 19:58:28 +00:00
Jeff Young
c9acca1342 Make fromHotkey parameter explicit, and don't set it for non-hotkeys.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15527
2023-08-31 17:01:14 +01:00
Mike Williams
b1a388ca69 Grids: Support X and Y for all grids, add optional names 2023-08-30 11:22:19 -04:00
Mike Williams
3edcef0229 Grids: remove more uses of old user grid in UI
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15515
2023-08-28 07:27:25 -04:00
Jeff Young
eba8acf602 Attempt to fix presumed event ordering issue on MSW. 2023-08-27 13:25:39 +01:00
Jeff Young
4fefd95e0c Move grid definitions to Prefs and grid origin to a separate dlg.
Grid origin is document-wide, while grid definitions are app-wide.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2262
2023-08-26 13:32:24 +01:00
Mike Williams
0f781f328e GRID_HELPER: push code to parent class
Prep'ing for PCB grid overrides
2023-08-24 10:29:09 -04:00
Mike Williams
a75fb44349 Common: add fast grid cycling
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12339
2023-08-03 11:57:51 -04:00
Mike Williams
132a0ada73 Grid Overrides: support grids-per-type that override the current grid.
Schematic only at this point while we test and refine.

PCB support is a future addition.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14756
2023-07-25 10:17:57 -04:00
Jeff Young
c8e8b71198 TestDanglingEnds needs to test sheet pins as well.
Also fixes a bug where zooming doesn't get a redraw until mouse moves.

Also fixes a couple of bugs where dangling markers on SCH_SHEET_PINs
and SCH_HIERLABELs weren't getting drawn.

Also simplifies drawing algorithm by removing aesthetic offset (which
wasn't implemented when pin is drawn as part of selection VIEW_GROUP).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15129
2023-07-08 12:55:45 +01:00
Ian McInerney
2fb6f19a84 Separate immediate and delayed action dispatch
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
2023-06-27 00:57:59 +01:00
Ian McInerney
6c031a4aa4 Fix some more incorrect types in event parameters 2023-06-20 21:52:50 +01:00
Ian McInerney
b04e54dbea Switch TOOL_EVENT and TOOL_ACTION to have a std::any parameter
Using std::any from C++17 allows for proper type handling in the
parameter field, removing the need for casting to void* and then casting
the void* to the desired type.
2023-06-20 21:52:50 +01:00
Jon Evans
fc69939190 ADDED: GUI feedback when grid setting is changed by hotkey
Can be extended to other cyclical hotkey settings

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14756
2023-06-17 23:18:50 -04:00
Jeff Young
5875f89531 Centralize text size clamping.
Also introduces alg::clamp to improve readability of
std::max( min, std::max( value, max ) )

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14876
2023-06-03 20:29:51 +01:00
Marek Roszko
aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
Mike Williams
7ab651f078 Common: make grid prev/next wrap
Consistent with our other keys like change track and via sizes.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9051
2023-01-19 11:47:03 -05:00
Marek Roszko
1edf84d756 More wxS ugh 2023-01-17 07:43:04 -05:00
Jeff Young
19d270fe74 Text size sanity checking for TEXT_ITEMS_GRID.
Oh dear, there was a bunch going on here.  Firstly the move from int
to long long int for ValueFromString() means that we were no longer
catching overflows (as we were C-style casting it back to int in many
places).  But even when the overflow is caught, it would run in to
wxWidgets' empty string bug while trying to log it.

Fixes https://gitlab.com/kicad/code/kicad/issues/12577
2022-10-06 13:19:08 +01:00
Jeff Young
45d6b4a9fc Readability improvements. 2022-09-19 11:18:20 +01:00
Mark Roszko
b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
Jeff Young
d5430906d4 Make sure cursor settings get saved.
Fixes https://gitlab.com/kicad/code/kicad/issues/11663
2022-09-10 18:43:32 +01:00
Jeff Young
e5a664c6b3 Try a slightly different tack for cancelling net highlighting.
Fixes https://gitlab.com/kicad/code/kicad/issues/12029
2022-07-19 10:31:49 +01:00
Jeff Young
e122dc38bd Add context menu item for clearing net highlighting.
In selection tools, drawing tools, router tool, line_wire_bus tool.

Fixes https://gitlab.com/kicad/code/kicad/issues/11920
2022-07-10 17:15:20 -06:00
Jeff Young
2defd8d911 Move show-bounding-boxes to a tool on the toolbars. 2022-01-17 11:56:40 +00:00
david-beinder
b471945224 Fix MSVC C4312 warning when casting 32bit ints to pointer types on 64bit builds 2021-11-22 04:37:41 +00:00
Jeff Young
b84d1456d5 KIFACE_I -> KIFACE_BASE. 2021-09-14 23:45:14 +01:00
Jeff Young
8aea2cbd03 When ignoring click events don't ignore synthetic ones.
Fixes https://gitlab.com/kicad/code/kicad/issues/7255
2021-07-29 18:07:04 +01:00
Jeff Young
937f5138db Make zoom-to-fit margin big enough for infobar.
Otherwise part of the document is obscured behind it by default.
2021-06-19 22:45:47 +01:00
Jeff Young
2d28ed8eda Move canvas backend selection to Preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/7630
2021-02-21 20:12:43 +00:00