7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-02 00:26:45 +00:00
Commit Graph

1021 Commits

Author SHA1 Message Date
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
Jeff Young
b62f00912e Remove debug assert that's clogging up Sentry. 2025-03-29 21:24:08 +00:00
Mike Williams
e11cf94a3e design blocks: add PCB design blocks behind advanced config
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/2508
2025-03-20 15:13:52 -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
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
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
9e9db8bd4d Make tool framework assert more useful 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
Dmitry Rezvanov
c7aaf8b6e1 Enhance library pinning functionality to support pin/unpin multiple libraries in the library editor 2025-02-22 15:41:35 +00:00
Seth Hillbrand
564710b232 Move default place via hotkey to Ctrl-Shift-X
Remove this hotkey from "toggle show cursor always" as this is a more
global option, not as needed (probably) in hotkeys.

Also re-arranged MD_SHIFT + MD_CTRL+ <key> to  MD_CTRL + MD_SHIFT + <key>
in order to standardize and help searches in the future

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19903
2025-02-10 11:22:35 -08:00
Marek Roszko
1ecf1d97ae Start all toolbar bitmapbundles at the selected size 2025-02-06 20:44:39 -05: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
Seth Hillbrand
56ca054c0d Add new table icon
Replace a couple uses of the old spreadsheet
2025-02-01 09:53:12 -06:00
Mark Roszko
50e2a12e17 Fix palette icon scaling on Windows, also extend KiBitmapBundle because we use bundles wrong
wxBitmapBundle assumes the smallest bitmap added is the intended "original" size for a particular use case.
And generally that is probably true. However, we re-use icons in some places where we intend for them to start at 16
or start at 24. This is problematic when GetPreferredBitmapSizeFor is called for calculations because it'll return the
16*scale number instead of 24*scale number. So let's just allow passing in a min height restriction to KiBitmapBundle
for when we reuse bitmaps.
2025-01-31 10:37:00 -05:00
Seth Hillbrand
683be91b60 Adding new icons 2025-01-29 05:42:57 -06:00
John Beard
d90862b444 Pcbnew: fix snapping view update after hover delay
Te update didn't refresh, so the snap extensions sometimes only
appeared after the _next_ mouse move, which was annoying when the
mouse was very still (e.g. when deliberately hovering over an item).

Use a wxTimer to put all the callbacks in the UI thread which is also
much simpler. Also the update function needs to call a canvas refresh
as well as the item update.
2025-01-28 08:50:31 +08: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
59f20cdedc Fix Mac build. 2025-01-24 16:06:22 +00:00
John Beard
de7f735856 Pcbnew: fix extension snaps for initial persistent items
Specifically, do not race the delay against the proposal
cancellation for the initial items, but just accept them
immediately.
2025-01-24 03:46:58 +08:00
Jeff Young
5e6795a774 Ellipsis for Edit Table Properties dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19682
2025-01-20 11:39:50 +00:00
Wayne Stambaugh
e09b095533 Common folder housekeeping part 3. 2025-01-16 11:50:08 -05: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
Seth Hillbrand
7516e3a190 Update docs link
Instead of the hard-coded docs website, we use the redirect container to
keep the links valid and do forward-planning (e.g. 9.99)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19570
2025-01-10 15:19:21 -08:00
Seth Hillbrand
954e194f77 Add default paste special hotkey
Most applications will define paste special as Ctrl-Shift-V
2025-01-08 09:23:34 -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
Ian McInerney
7f8b88221d Initialize variables 2024-12-31 00:18:10 +00:00
JamesJCode
5ff21f9c2d Add ki::any and ki::any_cast for any_casts across translation units
ki::any is a standards-compliant implementation, based on the GCC
standard library. However, it uses type_info::hash_code() to check
the validitiy of a ki:any_cast, rather than comparing the type_info
objects directly. This comparison, used in the standard
implementations, is fragile across translation unit boundaries when
built with Clang.
2024-12-27 17:28:27 +00:00
Jeff Young
0bcf6000a4 Formatting. 2024-12-08 21:46:54 +00:00
Jeff Young
81834a023e Don't duplicate tooltips and descriptions, but do use the description if there's no tooltip.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19155
2024-11-19 23:39:41 +00:00
jean-pierre charras
e9651794d6 View menus: fix show/hide panel inconsistencies in FP and Symbol editors
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19147
2024-11-18 15:37:30 +01:00
John Beard
03f11eea78 Exclude letter hotkeys from Shift fallback
There is a fallback mechanism here designed to catch cases
where a hotkey is bound to a key that needs Shift to be
input (e.g. ? requires Shift on many non-US keyboards,
but the hotkey for that should be '?', not 'Shift+/'). For any key
where the two options are equally-valid "main" key (e.g. '6' and '^'
or '?' and '/' or ':' amd ';'), this is correct, as it allows
the hotkey to be simply the character in question.

Letters don't require this treatment - using this fallback
in the letter case means that a hotkey bound to 'B' will
also fire when 'Shift+B' is pressed, even when Shift+B is
bound to something else. In fact, it could even preempt the
real Shift+B hotkey.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19093
2024-11-08 19:48:03 +08:00
John Beard
1a86982a2a Avoid enum name conflict on MacOS. 2024-11-05 08:20:37 +08:00
John Beard
dbf68a80b8 GAL: also scope layer depth push/pops
This means that an early return or an exception between
a manual Push/Pop (or an omission of the Pop) cannot
corrupt the layer stack.

It also means the GAL doesn't have to maintain its own
stack (with the in-scope GAL_SCOPED_ATTRS taking that role).

Reomve the Push/PopDepth functions, as they're only ever
used in pairs, and doing it manually needs more care.
2024-11-04 20:41:44 +08:00
John Beard
87cd0a74f2 Point editor: unify segment, circle, bezier and tablecells (partial)
For segment, circle, beziers, these are the same in all editors and only
need access to the EDA_SHAPE nature, so we can remove the duplication
entirely.

For TABLECELLs, while the cells are polymorphic in that PCB and SCH
cells are both EDA_SHAPEs (via the TEXTBOXes), the parent TABLES
are not polymorphic, and thus the implementation can't be trivially
de-duplicated. Rather than do something with templates, just keep
it simple for now and maybe look at unifying tables later on.
2024-11-04 20:41:15 +08:00
John Beard
970d9b3615 Eeschema: point editor: edit polygons as on PCB
This includes edge dragging which is useful for rule areas.
2024-11-03 17:15:18 +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
59759b325f Fix scroll events in things not using WX_VIEW_CONTROLS
Make sure not to handle wheel events with 0 or 1 modifiers -
those are for the view handler, not the tool framework. We
can't rely on WX_VIEW_CONTROLS to run first, it's not always
used, for example in the 3D Viewer.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/19026
2024-10-31 19:51:52 +08:00
Jon Evans
031c5417a1 Fix build on macOS 2024-10-26 21:48:54 -04:00
John Beard
f09d274a3e Construction geom: thread must be constructed last
If the thread starts before the proposal tag is constructed
as nullopt, the thread can unblock and think it has a proposal.
This isn't true, so it reads junk memory and crashes.

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/18835
2024-10-27 07:41:16 +08:00
John Beard
4846d07e47 Construction geometry: lighter on the stack
Pass things as unqiue_ptrs. I don't think there's that much
on the stack, but certainly addinig big enough chunks to the batches can
upset the coroutines.

Also reinstate a ClearDrawables which went AWOL.pick

Relates-To: https://gitlab.com/kicad/code/kicad/-/issues/18835
2024-10-27 07:07:25 +08:00
John Beard
9c9542deea Bind multiply-modified scroll events to the increment action
Implemented as handling un-consumed scroll events that the
WX_VIEW_CONTROLS doesn't want because it has too many mods
set. Then dispatch these as TA_MOUSE_WHEEL events.

The default action from the selection tools is to run the
'increment' ACTION, which is implemented differently in the
various tools: eeschema can increment labels, symedit
does pin names and numbers, and fpedit does pad numbers.
2024-10-26 16:00:58 +08:00
John Beard
3f602f8177 Add 'Increment' actions
These are context sensitive actions that increment "something"
about the selected item.

A generic 'increment' action can be produced, e.g. by other tools
or UI events, which has in increment step (positive or negative)
and an 'index' which determines what about the item should be
incremented - it's up to the increment action handler to decide
what that means.

And then add a primary and secondary inc/decrement action,
which allows to bind hotkeys to each.

Bind these to:

* Sym edit: increment pin names/number
            increment text items
* Sch edit: increment lables and text
* FP/PCB:   increment pin numbers
            increment text items
2024-10-26 15:46:16 +08:00