Commit Graph

1118 Commits

Author SHA1 Message Date
Wayne Stambaugh 5afeb45a84 Eeschema: fix crash when attempting to edit missing library symbol.
Disable the edit symbol buttons in the symbol properties dialog when
there is no library symbol to edit.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11318
2022-09-02 15:48:10 -04:00
BugRepellentExtraStrong 6d14ce24aa eeschema: Fixes wrong displayed secondary worksheet
Fixes https://gitlab.com/kicad/code/kicad/issues/12017


(cherry picked from commit 02a6566438)
2022-09-02 10:03:44 +00:00
Wayne Stambaugh 32a11e4df0 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.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12190
2022-08-26 12:47:13 -04:00
Seth Hillbrand 9328cf42c5 Don't close blocking dialog in backannotate
Back annotate is called from a dialog, so this will close itself but not
exit, locking the UI

(cherry picked from commit 28876bef90)

Fixes https://gitlab.com/kicad/code/kicad/issues/12255
2022-08-22 07:05:30 -07:00
Wayne Stambaugh cfde5300d7 Fix wxWidgets 3.1 and later deprecated build warnings.
wxWidgets 3.1 has deprecated wxPATH_NORM_ALL when normalizing file
paths when calling wxFileName::Normalize().  This change keeps the
existing behavior except in places where our own internal
ExpandEnvVarSubstitutions() to expand environment variables.

(cherry picked from commit 898ec0d094)
2022-08-17 14:07:06 -04:00
Jeff Young 1f3bb83a06 Make EEschema highlight net consistent with PCBNew.
In particular, highlight net on an already highlighted net clears
highlight.

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

(cherry picked from commit e36491f231)
2022-08-04 00:08:12 +01:00
Jeff Young fec9331b48 Handle rotation while moving from move tool.
This keeps us from getting CancelInteractive events in the move tool
when the EditTool runs to do the rotate.

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

(cherry picked from commit bdffbbd43b)
2022-08-04 00:00:43 +01:00
Seth Hillbrand 7f71eef45b Move sheetpins by their connection point
Need to calculate the sheet pin anchor position in order to get it
aligned to the grid while moving

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

(cherry picked from commit 225b03d702)
2022-07-31 20:04:29 -07:00
Jeff Young 832c689345 Labels can connect directly to symbols, other labels, etc.
Fixes https://gitlab.com/kicad/code/kicad/issues/11768

(cherry picked from commit c6604e3576)
2022-07-25 20:56:11 +01:00
Jeff Young 0580fc6819 Add create-wire logic to labels.
Fixes https://gitlab.com/kicad/code/kicad/issues/11768

(cherry picked from commit 29900cad34)
2022-07-25 20:44:50 +01:00
Jeff Young 3c4f8a335f Save selection *before* clearing it. Saving after doesn't do much good.
Fixes https://gitlab.com/kicad/code/kicad/issues/11242

(cherry picked from commit 1751c8e1cf)
2022-07-25 19:35:06 +01:00
Seth Hillbrand c1ec63d4f9 Protect the Kiway dereference
Also find a few more places where we are reaching into a new frame to
perform actions that need to have dialogs closed.

Running actions should also wait for the next cycle rather than being
immediately executed when we are calling into a new frame.  This allow
for the cleanup actions onClose() to happen prior to the next action
starting

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

(cherry picked from commit 93fb00d815)
2022-07-18 09:48:50 -07:00
Seth Hillbrand a8c0bc0430 Keep track of blocking windows
Allows the calling KiWAY player to send messages to the blocking window
before signaling a separate call

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

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

(cherry picked from commit b5bf1da251)
2022-07-18 09:47:32 -07:00
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