Commit Graph

654 Commits

Author SHA1 Message Date
Seth Hillbrand 26f0c03e61 ADDED: support for 45 degree crosshairs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6047
2025-08-23 06:20:00 -07:00
Seth Hillbrand c47641f454 Revert "Add asan switch indicators"
This is a good idea but only for non-nested coroutines.  We nest.

This reverts commit a9121d4cd1.
2025-08-21 12:32:48 -07:00
John Beard 54349c5845 Tool: minor reduction of transitive includes 2025-08-20 20:34:08 +08:00
Jeff Young a0940b10d4 Always provide a SCH_SCREEN to SCH_COMMIT.
Fixes KICAD-YKY
2025-08-18 22:09:21 +01:00
Jeff Young 6f389fd320 Tighten parent/child undo/redo architecture.
Always look for pre-existing undo/redo record.  Checking for IsNew()
is less robust and should be avoided.  Also moves the checking to a
location where it will be easier to ensure that it's uniform.

Push get-undo-level-item processing down a level so it is uniformly
called.

Make sure tables & labels are uniformly handled.

Remove incorrect usage of Get/SetGroupId() for storing lastPin
(which we don't use anyway).

Lists of deleted and changed items MUST include the screen pointer.
An item could be changed on one screen but not on another.

Also tightens handling of PCB_NETINFO_T items, which are not in the
view.

Also fixes a bug where there is no increment parameter if you assign
the base increment command to a hotkey.
(This was discovered while testing the above changes.)

Also fixes a bug where delete during a move in PCB Editor did an
undo instead of a delete.
(Again, found while testing above.)

An experiment was also run to collapse shared parts of SCH_EDIT_FRAME
and SYMBOL_EDITOR_FRAME into SCH_BASE_EDIT_FRAME.  However, sharing the
undo code actually increased complexity, and there was very little else
of value in SCH_BASE_EDIT_FRAME (other than the Increment() routines).
2025-08-18 19:20:09 +01:00
Seth Hillbrand 1166cacc64 Snap point editor into place
Adds 90° support to the point editor and ensures editing is the same as
creating when it comes to point snapping

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21481
2025-08-15 12:19:06 -07:00
Jeff Young 60b4202766 CHANGED: Rework lock overrides architecture.
We now use a checkbox in the aux toolbar rather
than a query dialog (with "remember setting" checkbox).
2025-08-13 10:30:26 +01:00
Seth Hillbrand a9121d4cd1 Add asan switch indicators 2025-08-08 21:25:19 -07:00
Seth Hillbrand 73aa437259 Finalize lasso selection tool
- Move under rectangular selection
- Simplify available modes
- Link to new icon
- Make selection state persistent
- Allow additive/subtractive with KiCad configurable keys
2025-08-06 16:07:43 -07:00
Andrzej Wolski c73d555fe2 ADDED: Lasso selection in pcbnew
Adds a lasso or freeform selection tool to KiCad in addition to standard
rectangular selection.  Adds supporting HitTest routines

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/1977
2025-08-06 16:06:40 -07:00
John Beard 0eaedb770b Edit constraints: formalise ownership semantics 2025-08-07 00:55:47 +08:00
Seth Hillbrand 29eee9f126 Refactor grid_helper to allow testing
Make view and tool manager optional so that we can implement QA on the
actual snapping
2025-08-05 16:10:17 -07:00
Jeff Young 8c85cd43f3 Copy c'tor / operator= safety.
Also fixes a memory leak of search pane handlers.
2025-08-02 22:04:53 +01:00
Jeff Young e0351b60b2 No point-editor support for rotated tablecells. (KICAD-RN8) 2025-07-08 18:05:34 +01:00
Jeff Young 69b23df4c3 Make sure we don't end up with stale picker handlers (lots of Sentry tickets). 2025-07-04 12:10:59 -06:00
Jeff Young 0375985d58 Debugging for removing items not in the view. 2025-07-03 20:45:11 -06:00
Jeff Young 74bf678d99 Warp back from context menu before running command.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19560
2025-06-16 10:58:03 +01:00
aris-kimi 9c5b2c55fb Move simulation frame panel togglers to sch_actions and eechema.Simulator domain 2025-06-09 10:10:43 +01:00
Jeff Young f3050bd7ed Nullptr safety; performance; formatting. 2025-06-08 16:33:05 +01:00
Jeff Young 96dd1815ea Performance. 2025-06-08 16:33:05 +01:00
Seth Hillbrand 29dc45d584 Remove the forced ancillary grid
If you are moving an object, we already have the axis snap, forcing the
grid to center at the start of the move prevents us from easily aligning
elements by moving them.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18196
2025-06-05 12:04:25 -07:00
Jeff Young e8e7282fe1 Fix a bunch more bugs in bezier approximation. 2025-05-26 18:12:43 +01:00
Mike Williams 3c5a48868b groups: add ability to add selection to group 2025-05-14 12:15:22 -04:00
John Beard a116f5cd57 Point editors: move cycle arc mode to common action, add to menu
This isn't the best possible UX (having the various modes immediately
available as graphical affordances would be best). But it's somewhat
discoverable, and at least shows the hotkey, if any, and it in the
context menu and not hidden in a toolbar right click menu. So if the
affordance-type system doesn't make it for v10, this will at least
provide something in eeschema.
2025-05-02 21:30:33 +08:00
John Beard 01b29c12e0 Point editor: move arc editing behaviour to common code 2025-05-02 20:50:40 +08:00
Jeff Young ec6af4a5b4 Move Execute() to COMMON_CONTROL.
Also fixes other apps coming up in background.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20426
2025-04-18 13:41:19 -07:00
Jeff Young 24cef6d165 ADDED: calculator tools to Tools menu.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20426
2025-04-18 13:41:19 -07:00
Mike Williams 0c0dbc6271 groups: commonize group tool 2025-04-15 09:59:38 -04:00
Jeff Young 60364a9062 Performance improvements for hatched fills (round 2)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20570
2025-04-08 17:35:35 +01:00
Jeff Young 845cdb1b25 Performance optimisations for hatching. 2025-04-07 21:11:46 +01:00
Mike Williams 40058ebe80 actions: move all basic selection operations to common actions 2025-04-02 12:02:01 -04:00
Mike Williams f40b24d04a groups: move actions to common actions 2025-04-01 14:34:20 -04:00
Jeff Young 60a26308ae COMMIT lifetime safety.
If we pass a COMMIT to a posted action, the COMMIT
may no longer exist when the action is run.
Equally problematic, if another COMMIT is pushed
in between we'd probably also run into trouble.

We still allow the API to do this because we don't
have a better solution at present.  But we need
one.
2025-03-29 21:24:08 +00:00
Wayne Stambaugh bc4a40de76 Fix Coverity issue #543091.
https://scan8.scan.coverity.com/#/project-view/22886/10844?selectedIssue=543091
2025-03-19 12:38:50 -04:00
Wayne Stambaugh f53d1a5356 Fix Coverity issue #543084.
https://scan8.scan.coverity.com/#/project-view/22886/10844?selectedIssue=543084
2025-03-17 12:55:54 -04:00
jean-pierre charras 925f2f9bc1 class TOOLBAR_ITEM_TYPE: replace GROUP by TB_GROUP (collision with a Windows header) 2025-03-02 14:49:03 +01:00
Ian McInerney e202b00a74 Rework the toolbar settings storage and panel
This format is more extendable in the future, should separator and
spacer support be added to groups.

Also, this now has a working UI for modifying the toolbars.
2025-02-28 02:05:50 +00:00
Ian McInerney 85810510f4 Tweak toolbar settings a bit
* Manage the settings using the settings manager for better lifetimes
* Better architect the internals and JSON to make it easier to identify
  the various tool types
2025-02-28 01:57:37 +00:00
Ian McInerney 548334b4e2 Load toolbar configuration from settings 2025-02-28 01:57:37 +00:00
Ian McInerney 7e2a81da15 Initial JSON work 2025-02-28 01:57:37 +00:00
Ian McInerney 7ad1103f55 Move toolbars to a serializable storage format 2025-02-28 01:57:37 +00:00
Ian McInerney df15db3236 Initial toolbar reconfigurability settings 2025-02-28 01:57:37 +00:00
Ian McInerney c24dbc17bf Move toolbar setup flags into the action definition
This makes them centrally defined, and removes the need to specify them
when creating the toolbar.
2025-02-28 01:57:37 +00:00
aris-kimi e80780d3ad Added more simulation cursors at will.
Added m_signalsGrid context menu entries, Create a new cursor from every cell but Delete only from Cursor 3 and above

New entries are saved into their *.wbk files. Loading of current files should not be affected, as tested,
and on save they get the new property added.

Updates *.wbk file version to "7".

If the tab has more cursors than the loaded file, extra cursors should not be affected, otherwise new cursors shown up.
CursorD left hopefully untouched and kept the legacy behavior close to Cursors 1 & 2.

No more known bugs. It is now working as expected as tested on win11 and Debian 12.

m_cursorsGrid events also work.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15211
2025-02-27 22:42:11 +00:00
Jeff Young 3f15b0d75b ADDED: hatched fills for shapes. 2025-02-24 11:08:29 +00:00
Jeff Young 8874f137fa Read hotkeys from disk after they change.
(Otherwise we'll write the old versions back out
when closing one app.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19612
2025-02-01 20:01:13 +00:00
John Beard c120254aa4 Pcbnew: snap to object faster if no objects activated
Otherwise it's annoying to snap to the first item you get to
if you have to wait every time.
2025-01-25 23:57:38 +08:00
Jeff Young ce483c848a Remove previous version of disable-previews-when-menu-open.
(It had been rendered inoperative by the fix for
#16844.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19117
2025-01-13 19:45:49 +00:00
Wayne Stambaugh 89db935910 Housekeeping in include path sub-folders. 2025-01-04 09:21:11 -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