Commit Graph

255 Commits

Author SHA1 Message Date
Mike Williams 9e48c0b695 Grids: placing symbols should respect connectables, not graphics 2023-10-23 09:34:06 -04:00
Alex Shvartzkop 21adc0aac5 ADDED: Import vector graphics into Schematic editor (SVG, DXF). 2023-10-09 07:04:50 +03:00
Franck Jullien c010c7b0ea eeschema: add 'Already placed' category when choosing symbol 2023-10-04 10:29:22 -04: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
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
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
jean-pierre charras 79590c6372 Allows new items SCH_NO_CONNECT_T and SCH_BUS_WIRE_ENTRY_T to be repeated.
Fixes #15668
https://gitlab.com/kicad/code/kicad/-/issues/15668
2023-09-17 09:37:34 +02:00
Jeff Young 0310973e3f Push TEXT_SPIN_STYLE from SCH_TEXT out to SCH_LABEL_BASE.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15444
2023-09-07 17:42:51 +01:00
Jeff Young f6e238dc3f Add items to repeat_items after paste (or duplicate).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15556
2023-09-02 11:56:52 +01:00
Jeff Young 4325f4e038 ADDED: alternate pin functions in context menu.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12852
2023-08-28 12:51:41 +01:00
Mike Williams 66ed9cfe57 Schematic Editor: apply grid overrides to more tools 2023-08-23 11:31:27 -04:00
Mike Williams a44dd4d88f Symbol Editor: support grid overrides 2023-08-23 10:12:21 -04:00
Mike Williams 5b335f1c4e Schematic: junctions need to be added to the view before cleanup
Otherwise they aren't considered for breaking segments.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15146
2023-08-03 10:05:19 -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 1218f61d0a Implement undo/redo for footprint children.
Our special-cases to handle the fact that we didn't do this had far
outgrown the code necessary to actually handle it.
2023-07-15 17:37:31 +01:00
Jeff Young 5aed30ac79 Handle RepeatLastItem for TwoClickPlace items.
(Note that we've always excluded sheet pins from RepeatLastItem.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15108
2023-07-09 20:33:33 +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
Jeff Young 4764606a9d Sheet pins are owned by their parents, so the parent must go in the SCH_COMMIT.
Also collapses a bunch of duplicated code.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15044
2023-06-24 12:35:48 +01:00
Jeff Young 237cc7eee1 Move TestDanglingEnds() to SCH_COMMIT.
Also fixes a bug where Convert Symbol wasn't undoable.

Also cleans up some SetModified() call no longer needed with SCH_COMMIT.

Also fixes bug where revert of a modification didn't update the screen's
RTree.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15030
2023-06-23 19:59:46 +01:00
Jeff Young e9046076a6 Fine-tune SCH_COMMIT handling of child objects.
While a SCH_SHEET does indeed have a SCH_SHEET parent, it's not one of
the children that gets added as a CHT_MODIFY of its parent.

Also fixes a bug where the newly drawn sheet gets removed from the
preview before running the dialog.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14976
2023-06-18 16:52:11 +01:00
Jeff Young ef6866757e Treat undo as backspace and/or escape when drawing. Ignore redo.
Undo == backspace when drawing a polygon or chained lines.  Otherwise
it's an escape.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14961
2023-06-16 22:08:21 +01:00
Jeff Young 8259091ca1 Fix typo in new SCH_COMMIT architecture for shape drawing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14976
2023-06-16 15:50:51 +01:00
Jeff Young 4f39cb0789 Fix SCH_COMMIT handling in TwoClickPlace. 2023-06-13 13:21:11 +01:00
Seth Hillbrand 62f24aca1e Fix Connectivity Asserts in new COMMIT structure
The connection graph should only be updated within the commit structure
because this is the only time the connectivity should be changed.  We
want any connectivity changes to be included in the commit as well, so
this should be stored prior to the undo/redo list mods
2023-06-12 13:35:06 -07:00
Jeff Young 286716a1ff Retire AddItemToCommitAndScreen()
It duplicates a bunch of stuff in SCH_COMMIT and isn't really
compatible with it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14933
2023-06-12 19:34:23 +01:00
Jeff Young 8f1b9119bf Upgrade some symbol editor stuff to SCHEMATIC_COMMIT.
Also renames SCHEMATIC_COMMIT to SCH_COMMIT since it's not schematic-specifc.
2023-06-09 22:41:47 +01:00
Jeff Young e698156975 Upgrade many editing actions to SCHEMATIC_COMMIT. 2023-06-09 22:41:47 +01:00
Steve Bollinger 28b37ad020 Someone accidentally exchanged the x and y coordinates when flipping
components horizontally and vertically in
SCH_DRAWING_TOOLS::SingleClickPlace()

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14725
2023-05-25 12:11:48 +00:00
Jeff Young 14f004d2a5 Hook up text variable auto-complete for PCBNew.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14777
2023-05-25 10:24:50 +01:00
Jeff Young 5a9ed66cfd Go back to using QuasiModal for TextBox Properties.
Also removes auto-closing of blocking dialogs when inserting
symbols from the Symbol Editor or Chooser, preventing the bug
that QuasiModel was removed for earlier.

Also fixes a non-initialized parent pointer when the TextBox
Properties dialog was called from DrawShape().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14777
2023-05-25 10:24:50 +01:00
Jeff Young c016bea020 Make sure mouse isn't captured when dialog is raised.
Fixes https://gitlab.com/kicad/code/kicad/issues/14685
2023-05-06 11:28:14 +01:00
Jeff Young f7a552a2b3 Ensure item is gridded if there was no motion between clicks. 2023-04-18 23:55:56 +01:00
qu1ck 0c049eccc7 Fix a bunch of compiler warnings 2023-04-11 17:01:30 +00:00
Marek Roszko aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
Alex ecb28ddf1c Prevent ghost image after canceling bitmap placement. 2023-02-17 03:53:44 +03:00
Jeff Young 8dc7baad3d Cleanup actions should not activate tools. It causes all manner of side-effects.
Fixes https://gitlab.com/kicad/code/kicad/issues/13331
2023-01-06 22:15:20 +00:00
Wayne Stambaugh 73b7dcbc35 Attempt to unify symbol annotation behavior between place and paste.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13330
2023-01-04 07:36:00 -05:00
Mike Williams 068b714908 Schematic: merge dual import sheet pin actions
I believe I have managed to keep the slightly distinct functionality of
both implementations: the action will now use the selected sheet or find
one under the cursor if it's there.

It will also keep placing pins while they exist, which was inconsistent
in the behavior of the single click version before (other single click
commands keep placing until you cancel, e.g. no-connects )

Also, it will automatically end the tool when it runs out of sheet pins.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13296
2022-12-29 09:36:29 -05:00
Mike Williams f03fd5ad2d Schematic: remove IS_RESIZING
Is unused/redundant with IS_MOVING
2022-12-28 12:27:57 -05:00
Wayne Stambaugh 78e2f0fd4d Sheet instance handling improvements. 2022-12-26 08:30:03 -05:00
Jeff Young ba4a7a979a Don't respond to Duplicate events while placing multiple copies of a symbol.
It doesn't really make any sense as clicking will just create another copy
as well.

Fixes https://gitlab.com/kicad/code/kicad/issues/13253
2022-12-24 19:40:39 +00:00
Jeff Young 113fd83fdd Fix Clang-tidy warnings. 2022-12-19 13:19:21 +00:00
Jeff Young ebcc1ac062 Use current cursorPos when creating sheet pins.
Fixes https://gitlab.com/kicad/code/kicad/issues/13206
2022-12-19 12:27:55 +00:00
Seth Hillbrand 4f4e355ce5 Reset existingRefs on cancel
When placing, we need to keep our static pointer map valid.  If we
cancel the placement after annotation, we need to remove the annotated
symbol.  The safer way is to just recreate the map

Fixes https://gitlab.com/kicad/code/kicad/issues/12983
2022-11-29 13:37:23 -08:00
Wayne Stambaugh 4a27d856f7 Move schematic sheet instance information into file sheet definition.
This will make it possible to maintain sheet instance information when
copying and pasting from any sheet other that the root sheet of a
project.

Setting and getting sheet page numbers must now be performed using a
sheet path.  This was done to ensure that the instance paths were not
getting changed unexpectedly from different code paths.
2022-11-22 16:45:38 -05:00
Seth Hillbrand a5da46459c Be sure to update UUID when placing new elements
Fixes https://gitlab.com/kicad/code/kicad/issues/12588
2022-10-07 16:32:41 -07:00
Jeff Young fc10db25ba Netclass directive and label conversion improvements.
1) Copy label fields when converting.
2) Don't assume netclass directive should be net name -- this is very
unlikely.
3) Don't show font controls in Netclass Directive Properties dialog --
there's no basic text associated witha  Directive Label.
2022-09-22 01:22:19 +01:00
jean-pierre charras 5990595619 When adding a bitmap, do not clone it during moving.
Cloning is not necessary, and is memory consuming.
2022-09-19 17:41:47 +02:00
Mike Williams 9304607624 TOOL_EVENT: make command string non-optional
We're getting segfaults in places where this isn't checked. Also, add
some asserts so we can catch bad tool push/pop.

Removes all uses of GetCommandStr() and makes it private.
2022-09-19 10:23:09 -04:00
Marek Roszko 61e11d6896 Strip out Mils2Iu 2022-09-16 21:09:27 -04:00