Roberto Fernandez Bautista
c5cdda26ae
Fix crash in libedit when moving/editing pins in synchronised mode
Unit numbers start at 1, not 0. Our vector needs to be size + 1 if we want
to use the unit number as an index.
0 is reserved for "all units"
4 years ago
Seth Hillbrand
854472d550
Prevent automatic RTree recaching
Calling UpdateItem() may be performed by in a common loop, e.g. for(
SCH_ITEM* item : GetScreen()->Items() ) or similar. We cannot call
GetScreen()->Update( SCH_ITEM* ) in this routine as it will remove and
re-add the item to the RTree, invalidating iterators. If needed, the
items need to be cached to an external container before updating
Fixes https://gitlab.com/kicad/code/kicad/issues/9318
4 years ago
Jeff Young
5f3c67bd2b
Fill in some missing GetMsgPanelItems and make some others consistent.
Also expunges a std::vector<MSG_PANEL_ITEM> cover type.
4 years ago
jean-pierre charras
bff0307ac0
Edit pin number: fix a crash when a pin is common to all units (i.e. having a unit id = 0)
Fixes #8824
https://gitlab.com/kicad/code/kicad/issues/8824
4 years ago
Wayne Stambaugh
ee3eac325d
Expunge the use of the word part from Eeschema code.
4 years ago
Wayne Stambaugh
71c183d7bb
Rename LIB_PART to LIB_SYMBOL.
5 years ago
Marek Roszko
4df3cb912d
Remove another leaky wx/log.h header
5 years ago
Roberto Fernandez Bautista
3fa8795f26
Fix crash in LIBEDIT when editing pins
Units in library items start at 1. 0 is reserved for "all units".
Previous code was requesting an out of range index due to an assumption
that units start at 0.
5 years ago
Jeff Young
a0b9b0c3ee
Improve IsSymbolEditable to differentiate fields.
Fields are editable in Aliases, but still not in Legacy libraries,
locked libraries, etc.
Fixes https://gitlab.com/kicad/code/kicad/issues/7175
5 years ago
Michael Kavanagh
479487ceb1
Tidy up context menus a bit
Try and put the common actions in the same places
5 years ago
Wayne Stambaugh
0655f2c436
Symbol editor: do not disable tools and grey symbols from schematic.
Fixes https://gitlab.com/kicad/code/kicad/issues/6968
5 years ago
Slawomir Siudym
157ceedc12
Fix offset of repeated pin in Symbol Editor
5 years ago
Wayne Stambaugh
f311831c27
Coverity fixes.
280252, 314742, 314745, 314747, 314755, 314756, 314757, 314758,
314935, 314936
5 years ago
Seth Hillbrand
0fd920a94c
Modify Synchronize Pins behavior
Consider a pin synchronized iff the names and electrical types match in
addition to the position, orientation and demorgan variant.
Also, only modify one matching pin per unit. This prevents
moving/editing a full stack of pins on the same unit when synchonized.
Fixes https://gitlab.com/kicad/code/kicad/issues/2590
5 years ago
Jeff Young
b6e267b78d
Naming conventions.
5 years ago
Peter Montgomery
821128cb8e
Eeschema: Make auto-decrementing net labels stop at zero
CHANGED: If you set the auto-increment value to a negative number,
created a net label and hit the insert key, when the name got below zero,
the net labels tried to go negative but created bad labels instead.
Now the code caps decrementing at zero, warns users when it has
happened, and explains why.
Fixes https://gitlab.com/kicad/code/kicad/issues/6537
5 years ago
Jeff Young
bddc97df30
LibEdit -> SymbolEditor
5 years ago
Mark Roszko
1082402b33
Convert UNDO_REDO_T to an enum class
5 years ago
Jeff Young
f4ab14f32d
Performance improvements for SchematicCleanup().
Fixes https://gitlab.com/kicad/code/kicad/issues/4563
5 years ago
Jeff Young
dcd02539e3
Remove linked-pin processing from LIB_PIN's setters.
It belongs in the tool layer (specifically LIB_PIN_TOOL).
5 years ago
Jeff Young
11ca21039a
Clear new flag when creating image pins.
Otherwise if you then move it we'll think it needs to be inserted
and end up with a circular drawings list.
Fixes https://gitlab.com/kicad/code/kicad/issues/4622
5 years ago
Jeff Young
1535c83b88
Lay some groundwork for adding distances to DRC errors.
modified: eeschema/lib_rectangle.cpp
6 years ago
Jeff Young
122b1ddaae
Unwrap an unnecessary layer now that we have new config stuff.
6 years ago
Mark Roszko
70908043a3
Convert enums inside eeschema and the symbol editor to be scoped
Scope: NETLIST_ITEM, CONNECTION_TYPE, ELECTRICAL_PINTYPE,
NET_CONNECTION, NETLIST_ITEM, GRAPHIC_PINSHAPE
Note, the pin type enum had PT_ added to the front to prevent
shadowing of the INPUT symbol on msys2 (see discussion at
c17c9960d8 )
6 years ago
Seth Hillbrand
84d5d6c168
Eeschema: Return null in case of canceling placement
6 years ago
Ian McInerney
079423c3cc
eeschema: Remove unused include of eeschema_id.h
6 years ago
Jeff Young
a5a237ac32
Improve readability of flag checking.
6 years ago
Jeff Young
3cdf88f2c6
CERN copyrights for work packages.
6 years ago
Maciej Suminski
c715a22e1c
Symbol Editor: clear IS_NEW flag after placing a pin
IS_NEW flag needs to be cleared after a pin is placed, otherwise further
move operations will keep adding the pin to the edited symbol.
6 years ago
Jeff Young
e6d5110ccf
Implement I18N for ACTIONs.
It's a bit of a hack because they're statically initialized and
so we can't make use of the _() macro. We do still want it in the
code, however, because the string harvesting is based off of it.
Fixes: lp:1833000
* https://bugs.launchpad.net/kicad/+bug/1833000
7 years ago
Jeff Young
19aba615c2
Remove selection condition from conditional menu separators.
We don't allow duplicate separators anyway so all they really do
is complicate the code.
7 years ago
Jeff Young
5610261dce
Immediate-action hotkeys (and context menu actions) for eeschema.
7 years ago
Jeff Young
e4d16abcbd
Fix overly-generic flag test when synchronizing pins.
Fixes: lp:1832170
* https://bugs.launchpad.net/kicad/+bug/1832170
7 years ago
Jeff Young
a568e70b99
Follow naming conventions.
7 years ago
Jeff Young
5e49517781
Move hotkeys to ACTION architecture.
7 years ago
Jeff Young
765606012f
Convert separate-compilation of selection.cpp to polymorphism.
7 years ago
Jeff Young
d2daab808c
Remove some legacy cursor handling stuff.
7 years ago
Jeff Young
68224e0fcd
Don't double-add pins to parent part when pasting.
Also adds undo to paste operations in LibEdit.
Fixes: lp:1829355
* https://bugs.launchpad.net/kicad/+bug/1829355
7 years ago
Jeff Young
f602ccd814
Insert EE_TOOL_BASE under SchEdit and LibEdit tools, and fix errant rename scope which clobbered PCBNew's PICKER_TOOL.
7 years ago
Jeff Young
7995b5cc3c
Restore selection on abort and undo/redo.
Also includes a related bug fix to not create an undo record for
the initial schematic cleanup.
Fixes: lp:1825975
* https://bugs.launchpad.net/kicad/+bug/1825975
7 years ago
Jeff Young
c1539ae014
Naming changes to reflect sharing between SchEdit and LibEdit.
7 years ago
Jeff Young
f6e07f575a
Rename for clarity.
SetOffset() didn't set anything; it performed an action.
Move() suggests a delta, when it in fact does a SetPosition().
7 years ago
Jeff Young
ea0941cab3
Implement modern tools for LibEdit.
7 years ago
Jeff Young
469231ae15
Move Pin, Symbol Text and Symbol Anchor to modern toolset.
7 years ago
Jeff Young
a461eae8b9
Fix 100s of usages of GetFlags() which conflated != 0 with being edited.
While this was true long ago, many flags have been added since which
have nothing to do with editing (HIGHLIGHTED, BEGIN_ONPAD, etc.)
7 years ago
Frank Severinsen
71a62bb782
Change pin on grid test in symbol editor.
The pin on grid test always used a fixed grid spacing of 25 mils. The
change uses the current grid setting for the on grid test. Grid sizes
below 25 mils are clamped to 25 mils to prevent issues when connecting
wires to pins in the schematic editor.
Fixes lp:1817896
https://bugs.launchpad.net/kicad/+bug/1817896
7 years ago
Jeff Young
96e65c7f23
Hide existing object when displaying moving preview.
Fixes: lp:1799478
* https://bugs.launchpad.net/kicad/+bug/1799478
7 years ago
Jeff Young
8a54b1b3b7
Add view refresh calls for edit operations.
Note that the bug referenced in the "fixes" section is only one
of many addressed by this commit.
Fixes: lp:1798449
* https://bugs.launchpad.net/kicad/+bug/1798449
7 years ago
jean-pierre charras
9df7626e31
Fix issue: Symbol library editor: Moving pins jumps to origin
Also: remove outdated lines in code.
Fixes: lp:1797266
https://bugs.launchpad.net/kicad/+bug/1797266
7 years ago
Seth Hillbrand
bfa7f16b44
Wrap printfs in DBG defines
This places the remaining printf statements behind DBG() macros to
suppress their output on release builds. We should remove these prior
to 5.1
7 years ago