Commit Graph

1105 Commits

Author SHA1 Message Date
Jeff Young 042b49ee7b Update message panel from PCB point editor and SCH drawing tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/11961

(cherry picked from commit 4f62960334)
2022-07-06 19:48:09 -07:00
Mike Williams 761ddcad21 Schematic: Add shift-space hotkey for consistency with PCB editor
Already in 7.0/master.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10858
2022-06-29 12:54:18 +00:00
jean-pierre charras 7168441a1b Symbol checker: fix incorrect test for duplicate pins.
From master branch
https://gitlab.com/kicad/code/kicad/issues/11660
2022-06-04 11:07:13 +02:00
Jeff Young c117708220 Unset forced cursor before leaving two-click place.
Fixes https://gitlab.com/kicad/code/kicad/issues/11607

(cherry picked from commit 79a0ce9137)
2022-05-31 23:21:43 +01:00
Marek Roszko 7563f51212 Fix eda_doc not looking for schematic locally
It looks like this was overlooked by Jeff in 2020 not realizing eda_doc isn't built under eeschema but common in cc9ac37a0e


(cherry picked from commit f85251ef75)
2022-05-11 03:33:40 +00:00
Jeff Young 5b24003f6c Promote field selection to field-owner for Autoplace.
Fixes https://gitlab.com/kicad/code/kicad/issues/11529

(cherry picked from commit f6f316bd8c)
2022-05-09 12:07:33 +01:00
Jeff Young 362eec7ee3 Update findnext to handle new instance data architecture.
Fixes https://gitlab.com/kicad/code/kicad/issues/11424

(cherry picked from commit e0f2a5f07c)
2022-05-09 00:36:27 +01:00
jean-pierre charras ed153bd7d7 Symbol editor crash: Fix use of a null pointer.
LIB_TEXT::Clone() did not copy a member set to nullptr.
From Master branch
Fixes #11569
https://gitlab.com/kicad/code/kicad/issues/11569
2022-05-06 12:54:32 +02:00
jean-pierre charras 82631db1bb Eeschema, backannotate: fix minor issues in displayed messages.
From Master branch
Fixes #11530 https://gitlab.com/kicad/code/kicad/issues/11530
2022-05-05 11:29:58 +02:00
Simon Richter cc51807241 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 02:16:17 +02:00
Jeff Young c8cd214cb0 Make sure to add any now-necessary junctions after a rotate.
Fixes https://gitlab.com/kicad/code/kicad/issues/11242

(cherry picked from commit 74a578047c)
2022-04-12 13:24:14 +01:00
jean-pierre charras 6127ae92a5 PLOTTER: do not clamp coordinates to an arbitrary value.
Previously, coordinates were clamped to +- 60 inches. It makes no sense to
clamp them at plotter level: max cooed depends on the editor (schematic/board...)
Rename MAX_PAGE_SIZE_MILS to MAX_PAGE_SIZE_EESCHEMA_MILS and use it only for Eeschema.
Fixes #11196
https://gitlab.com/kicad/code/kicad/issues/11196

(cherry picked from commit 21144481d2)
2022-04-04 13:52:21 -07:00
Jeff Young f89256e51e Implement align-to-grid for sheets.
Fixes https://gitlab.com/kicad/code/kicad/issues/11201

(cherry picked from commit 8dc680adbb)
2022-04-03 18:14:23 +01:00
jean-pierre charras 39959844e5 SYMBOL_EDITOR_CONTROL::DuplicateSymbol(): fix incorrect validation test.
DuplicateSymbol() is called both to duplicate and paste. Only duplicate
needs a test to know if a symbol is selected.
Fixes #11053
https://gitlab.com/kicad/code/kicad/issues/11053
2022-04-02 08:20:27 +02:00
Jeff Young 8ccc5bd8f2 Special-case synthetic click after tool selection.
Fixes https://gitlab.com/kicad/code/kicad/issues/11057

(cherry picked from commit 1f745b000d)
(cherry picked from commit dd55ffb75c)
2022-03-18 12:49:44 -07:00
Seth Hillbrand 9bfbe3acd8 Revert "Special-case synthetic click after tool selection."
This reverts commit dd55ffb75c.
2022-03-17 16:21:39 -07:00
Jeff Young c90842dd08 Update value & footprint from clipboard whether keeping annotation or not.
Fixes https://gitlab.com/kicad/code/kicad/issues/11116

(cherry picked from commit 400cff994d)
2022-03-17 22:34:52 +00:00
Jeff Young 310b4cdf75 Re-entrancy blocker for line/wire/bus tool.
Also clear infobar messages after a cancelInteractive.

Fixes https://gitlab.com/kicad/code/kicad/issues/11155

(cherry picked from commit 05bca282f7)
2022-03-17 22:34:52 +00:00
Jeff Young dd55ffb75c Special-case synthetic click after tool selection.
Fixes https://gitlab.com/kicad/code/kicad/issues/11057

(cherry picked from commit 1f745b000d)
2022-03-16 17:11:07 +00:00
Seth Hillbrand 8d246dbee0 We're not c++20 yet
Remove designated initializers
2022-03-08 11:08:41 -08:00
Mike Williams 2535237c31 Schematic: breaking wire needs different drag parameters
Our heuristics for determining when to append to the undo aren't
sufficient for the two segments of a broken wire. One is new and the
other is changed, but the drag should be appended to the current undo.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10865
2022-03-08 18:00:46 +00:00
Seth Hillbrand 802d20c409 Duplicate from selected or current
When double-clicking to open a symbol, it is no longer selected in the
tree.  We need to use the `GetTargetLibId()` to pick the correct symbol
(first selected, then current) when using the duplicate command

Fixes https://gitlab.com/kicad/code/kicad/issues/11034
2022-03-03 15:20:30 -08:00
Seth Hillbrand 79b6991d7b Fix broken unit select context menu
The fix for https://gitlab.com/kicad/code/kicad/issues/10529 kicked the
subsequent IDs for unit selection off the maximum ID value for popup
menus.  This increases the maximum popup number (integers are free)
2022-03-02 16:32:04 -08:00
Jeff Young d4937f1b3e Don't allow break commands (or labelling cmds) on multiple wire selections.
Fixes https://gitlab.com/kicad/code/kicad/issues/10934
2022-02-27 20:14:56 +00:00
Seth Hillbrand a30ad0b54a Honor modifier keys in diambiguation
Needs to be reset for the new action before selecting elements at a
point.

Fixes https://gitlab.com/kicad/code/kicad/issues/9712
2022-02-25 16:15:56 -08:00
Seth Hillbrand 23351b2046 Add MRU to image placement tools
(cherry picked from commit faa3829ad4)
2022-02-25 13:21:25 -08:00
Mike Williams 7d4cb91f39 Schematic: disallow center rotation, allow both endpoint rotations
Center rotation will often misalign lines to the grid, which is bad
until fix off grid items on the schematic.

We can rotate a connection end into a new connection or to become
collinear with an existing line, so we need to check for this at the end
of rotation.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10565
2022-02-25 16:27:55 +00:00
Mike Williams 899c2d9080 Schematic: handle switching h/v mode better while drawing lines
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10859
(cherry picked from commit e35c3f2b99)
2022-02-21 12:06:12 -05:00
Jeff Young b4ac59d9d3 Don't crash on highight net during drag.
Fixes https://gitlab.com/kicad/code/kicad/issues/10866
2022-02-21 12:25:55 +00:00
Jeff Young 15fd0aa989 Disable grid when ctrl/cmd key is down.
Fixes https://gitlab.com/kicad/code/kicad/issues/9995
2022-02-20 16:10:53 +00:00
Jeff Young da82ba00e4 Resolve text variables before attempting to open datasheet.
(cherry picked from commit 510dc28a5c)
2022-02-20 01:03:08 +00:00
Seth Hillbrand 75a4036e45 Trim wires based on how many pins they intersect
If a wire intersects more than 2 pins from the same symbol, we don't
trim connections.  If the wire intersects exactly two pins from a single
symbol, we remove the wire between the pins.

We avoided doing this before because we didn't have a good metric for
trimming vs. not.  But the per-symbol calculation feels like the least
surprising option.

Fixes https://gitlab.com/kicad/code/kicad/issues/10909

Fixes https://gitlab.com/kicad/code/kicad/issues/1857
2022-02-19 16:54:19 -08:00
Seth Hillbrand 470d7d228d Fix wxT overzealous replacements
A couple of regex mistakes slipped through and need to be reverted here
2022-02-16 17:21:49 -08:00
Jeff Young f8ac6df0cd Implement undo for Eeschema find/replace.
Fixes https://gitlab.com/kicad/code/kicad/issues/10824

(cherry picked from commit 33e57930bc)
2022-02-13 18:19:59 +00:00
Seth Hillbrand 861589d837 Use wxEmptyString instead of wxT( "" )
Also fixes places where ternaries did autopromotion instead of returning
an empty wxString
2022-02-09 10:33:52 -08:00
Seth Hillbrand a444addd89 Default eeschema strings to wide
Prevents stack bug on MacOS
2022-02-08 15:14:54 -08:00
Seth Hillbrand 7642a9db79 Setup selection when repeating
We need the item to be currently selected when repeating the last symbol
insert.  This ensures we have a valid selection before starting the move
tool and possibly getting odd system behavior from mouse positions

Fixes https://gitlab.com/kicad/code/kicad/issues/10619
2022-02-03 17:09:31 -08:00
Jeff Young 69b69aa431 Update text variables when they change.
Fixes https://gitlab.com/kicad/code/kicad/issues/10734
2022-02-04 00:34:20 +00:00
Seth Hillbrand 70d00689ca Fully select a line for transformation
When not trying to select points, we need to ensure that the full
line is selected for transformation

Fixes https://gitlab.com/kicad/code/kicad/issues/10566
2022-01-29 17:36:54 -08:00
Seth Hillbrand 56d87a8613 Catch default autowire case
Since we are dereferencing the optional, we need to ensure it exists in
all cases

Fixes https://gitlab.com/kicad/code/kicad/issues/10394
2022-01-12 09:02:39 -08:00
Seth Hillbrand 62f8603353 Don't deduplicate symbol polygons
SHAPE_LINE_CHAIN will, by default, remove duplicate points when
appending.  We don't want to do this when constructing our polygons in
symbol editor, so we need to explicitly call the routine without
deduplication

Fixes https://gitlab.com/kicad/code/kicad/issues/10289
2022-01-07 08:25:09 -08:00
Seth Hillbrand 9a2332dfcf Clear edited point when exiting tool
When leaving the main point editor loop, we need to ensure that the edit
point is cleared as well.  This is usually cleared by a ClearEvent call
but in case this is missed, we need to ensure that other tools are not
caught out

Fixes https://gitlab.com/kicad/code/kicad/issues/10288
2022-01-07 08:23:31 -08:00
Seth Hillbrand b8a7a66a0a Keep symbol synced with edit tool
Undo/Redo can change the symbol referenced by the symbol drawing tool.
This updates the current symbol before important steps to keep the
system synced

Fixes https://gitlab.com/kicad/code/kicad/issues/10125
2022-01-05 16:51:41 -08:00
Roberto Fernandez Bautista 5e884d14c7 Rename ComparePageNumAndName -> ComparePageNum 2022-01-02 23:27:15 +00:00
Marek Roszko 6fd93eaa1e Silence MSVC warnings about type mismatch and unused var
(cherry picked from commit 34e90e5045)
2022-01-01 19:50:11 +00:00
Roberto Fernandez Bautista e19acb4632 Correctly handle excluding an ERC marker in eeschema when right clicking
In addition, hide the option to exclude a marker if the selected marker
is already excluded.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10173

(cherry picked from commit 701e256b3f)
2021-12-30 17:16:04 +00:00
Jeff Young 2efa878287 Use a bigger hammer to update adjacent segments.
Fixes https://gitlab.com/kicad/code/kicad/issues/9927

(cherry picked from commit ee5db73113)
2021-12-23 17:01:22 +00:00
Jeff Young 885979ba75 Fix selection logic to handle LIB_ITEM as well as SCH_ITEM.
Fixes https://gitlab.com/kicad/code/kicad/issues/9954
2021-12-12 17:38:38 +00:00
Jeff Young d1e6c216e1 And the modify bit wasn't getting set either.
Fixes https://gitlab.com/kicad/code/kicad/issues/9926
2021-12-11 01:09:13 +00:00
Jeff Young 15d1abeeef Sigh. But addCorner() *does* need mapCoords().
And it's got an off-by-one error in it too.  I don't think this
ever worked at all.

Fixes https://gitlab.com/kicad/code/kicad/issues/9926
2021-12-11 01:06:36 +00:00