Commit Graph

220 Commits

Author SHA1 Message Date
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
Jeff Young 0c8787cbb9 Some more wxPoint/EDA_RECT yeeting. 2022-08-31 00:44:33 +01:00
Seth Hillbrand b736460e71 Move optional access from value() to *operator
`value()` throws.  Where we check for existence, we don't need to use
the throwing version and should just use the unprotected variant
2022-08-30 13:59:39 -07:00
Wayne Stambaugh 7c6d9f67f9 Eeschema: fix broken instance data when adding new symbol.
Pass the current SCHEMATIC object pointer in SCH_SYMBOL ctor so that
newly created symbols will update the current instance data on creation
when the current sheet instance is being displayed.

This is a better fix for the master branch and cherry-picking from 6.0
was a mess.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12190
2022-08-26 13:35:49 -04:00
Jon Evans ae6a2a6443 ADDED: Database libraries MVP
Allows placing parts from an external database that reference symbols from another loaded library.

Includes:
- nanodbc wrapper
- database schematic library plugin
- basic tests

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7436
2022-08-26 10:51:13 -04:00
Seth Hillbrand f1261e71d4 Replace boost::optional with std::optional 2022-08-25 15:50:47 -07:00
Jeff Young aa2ad3b44c Move KICAD_T[] to std::initializer_list<KICAD_T>. 2022-08-20 10:28:11 +01:00
Mike Williams d9449b9beb Annotation: annotate all sheet instances for new symbols
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11841
2022-07-25 18:44:55 +00:00
Seth Hillbrand f78671fc2e Make textbox placement modal
Placing a symbol from symbol editor starts the TwoClickPlace in a
different context.  We need to prevent multiple contexts of the same
tool

Fixes https://gitlab.com/kicad/code/kicad/issues/11891
2022-07-19 09:20:43 -07:00
Jeff Young d24e6c3408 Auto-annotate (and then don't re-annotate) power symbols.
Fixes https://gitlab.com/kicad/code/kicad/issues/11942
2022-07-11 21:46:01 -06:00
jean-pierre charras 7b28804f67 Fix a minor compil and Coverity warning 2022-07-06 13:54:17 +02:00
Miklos Marton d30af7c164 eeschema: Add automatic rotate feature for placing global and
hierarchial labels
2022-07-05 17:02:45 +00:00
Mike Williams 66b3b48e93 Library Editor: Fix missing automatic annotation
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11818
2022-06-29 14:17:21 +00:00
Jeff Young bce1fd337b Second tool hotkey accepts action (ie: acts as click).
Fixes https://gitlab.com/kicad/code/kicad/issues/11729
2022-06-09 16:54:04 +01:00
Jeff Young c55a0e4561 Separate last-created-params for textboxes from shapes.
Fixes https://gitlab.com/kicad/code/kicad/issues/11755
2022-06-08 15:25:13 +01:00
jean-pierre charras 9f38fa43cd Fix some minor compil and Coverity warnings. 2022-06-05 11:44:49 +02:00
Jeff Young ce79a16ed8 Use default schematic text size for textboxes.
Also adds support for remembering stroke info, fill info, and
spin style for sch text boxes.

Fixes https://gitlab.com/kicad/code/kicad/issues/11739
2022-06-03 21:48:12 +01:00
Jeff Young abba1b04bd Add "Enter Sheet" to Sheet tool (context menu & double-click).
Fixes https://gitlab.com/kicad/code/kicad/issues/11531
2022-05-30 14:08:26 +01:00
Mike Williams f2cf934083 Schematic: Annotation Tweaks
Fix newly placed symbols to be annotated and not show a ? until
placement.
2022-05-27 15:54:00 +00:00
Mike Williams efa23a5cbe Schematic: better automatic/recursive annotate 2022-05-27 15:54:00 +00:00
Mike Williams dabd42bbc4 Schematic: Automatic Symbol Annotation 2022-05-27 15:54:00 +00:00
Roberto Fernandez Bautista ea29c66608 Fix formatting 2022-05-22 07:14:24 +00:00
Chetan Shinde 4e5febdb19 Fixes the import pin issue, that the they are shown in two different way https://gitlab.com/kicad/code/kicad/-/issues/11391 2022-05-22 04:42:22 +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
Jeff Young f2fc78f380 Don't copy modifiers to prime events.
The modifiers go with the hotkey, not with the action.

Fixes https://gitlab.com/kicad/code/kicad/issues/11618
2022-05-16 13:51:40 +01:00
jean-pierre charras 4bd349d922 Update some demos 2022-05-09 19:06:14 +02:00
Jeff Young babfb29c54 Formatting cleanup. 2022-05-03 13:39:14 +01:00
Jeff Young 67f352717e Fix dodgy type-cast and init line-widths to "inherit".
Fixes https://gitlab.com/kicad/code/kicad/issues/11535
2022-05-03 13:39:14 +01:00
jean-pierre charras ece15b6472 Fix a compil warning (shadowed var). 2022-05-02 15:25:55 +02:00
Jeff Young 772bdc4bbf Turn off auto-dialog for text objects when immediateActions == false. 2022-05-02 11:25:40 +01:00
Jeff Young de0bb26c4c Init global label's intersheet ref's visibility from schematic settings. 2022-05-02 09:42:38 +01:00
Miklós Márton 7ebdb4853c Do not open label edit dialog when adding label to an already named wire 2022-05-02 08:42:15 +00:00
Simon Richter 801c5deb87 Fix minimum size calculation for new hierarchical sheets
These constants are given in mil, but are used in a context of internal
units.
2022-04-18 15:01:59 +00:00
Jeff Young 4ee6f9e138 Make sure setting the cursor gets put into the right tool context.
Fixes https://gitlab.com/kicad/code/kicad/issues/10141
2022-03-28 21:54:24 +01:00
Jeff Young 4f62960334 Update message panel from PCB point editor and SCH drawing tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/11186
2022-03-21 10:32:36 +00:00
Jeff Young 05bca282f7 Re-entrancy blocker for line/wire/bus tool.
Also clear infobar messages after a cancelInteractive.

Fixes https://gitlab.com/kicad/code/kicad/issues/11155
2022-03-17 15:27:33 +00:00