Commit Graph

1160 Commits

Author SHA1 Message Date
Seth Hillbrand 25474b347c Fix frustration with mirroring autoplaced fields
When the user asks to mirror a symbol is is frequently to get the
reference/value on the other side of the symbol for placement purposes.
Autoplacing the fields here keeps the text where they were initially
which can be frustating to work around.

This commit treats the mirror command as a user request to change where
the fields are
2022-04-25 12:50:45 -07:00
Jeff Young f5d612eaed Switch <insert> replacement on OSX to <f1>.
Fixes https://gitlab.com/kicad/code/kicad/issues/11413
2022-04-25 10:01:33 +01:00
Jeff Young 90bfe2d94b Remove Save Copy As from fp editor, and rename to Save a Copy elsewhere.
It's still used by Eeschema and PCBNew when not in stand-alone mode.

Fixes https://gitlab.com/kicad/code/kicad/issues/9185
2022-04-24 19:46:57 +01:00
jean-pierre charras 3bc34590c7 Eeschema: fix missing call to UpdateMessagePanel() due to commit e09147db.
EE_INSPECTION_TOOL::UpdateMessagePanel was called by EVENTS::SelectedEvent
But This event after commit calls E_INSPECTION_TOOL::CrossProbe(),
and no longer UpdateMessagePanel.
So CrossProbe() now calls UpdateMessagePanel.
Fixes #11447
https://gitlab.com/kicad/code/kicad/issues/11447
2022-04-24 18:40:10 +02:00
Jeff Young c6f83b6dec ADDED Duplicate Footprint, Rename Symbol and Rename Footprint. 2022-04-22 22:06:51 +01:00
Mike Williams b42365190e Schematic/PCB: deleting fields sets them to invisible 2022-04-21 16:20:23 +00:00
Mike Williams 653baf270c Schematic: drag created / changed segments need junction checks
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10844
2022-04-18 17:24:02 +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 71c2cb3180 ADDED revert for pcbnew and eeschema.
Fixes https://gitlab.com/kicad/code/kicad/issues/6802
2022-04-17 20:02:58 +01:00
jean-pierre charras 38c54ffa8f Eeschema, Symbol Library Browser: fix crash when left clicking on the canvas. 2022-04-17 09:54:19 +02:00
Jeff Young e09147db30 Cross-probing for ERC dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/11411
2022-04-17 00:33:56 +01:00
Seth Hillbrand 250a246761 Clear flags after we're done with them
The CANDIDATE flag is a temporary element that should not be maintained
outside of the routine in which is it temporarily set

Fixes https://gitlab.com/kicad/code/kicad/issues/11361
2022-04-16 15:45:17 -07:00
jean-pierre charras 65f7d9f97a EEschema: move symbol checker code in symbol_checker.cpp.
- Add some tests for Power symbols.
- Fix incorrect print format in some messages.
2022-04-16 18:56:06 +02:00
Jeff Young 6ef6e37edb Disable using default instance data when writing to clipboard.
Fixes https://gitlab.com/kicad/code/kicad/issues/11379
2022-04-14 17:09:27 +01:00
Jeff Young 034b57d9c0 When reannotating keep existing prefix in most cases.
(Execption is reannotating entire schematic, in which case we reset
all of them.)

Fixes https://gitlab.com/kicad/code/kicad/issues/11379
2022-04-13 23:38:45 +01:00
Jeff Young 306dfef7e5 Fix typo. 2022-04-12 19:18:15 +01:00
Jeff Young 576f3dc2fd Keep pins aligned to grid when possible.
This uses the first pin as the anchor point in a mulitple-item
selection.

Fixes https://gitlab.com/kicad/code/kicad/issues/11151
2022-04-12 18:14:21 +01:00
Jeff Young 546b3bfbc0 Select wire ends in select all.
Fixes https://gitlab.com/kicad/code/kicad/issues/10958
2022-04-11 19:36:54 +01:00
Jeff Young 74a578047c Make sure to add any now-necessary junctions after a rotate.
Fixes https://gitlab.com/kicad/code/kicad/issues/11242
2022-04-11 12:02:20 +01:00
Jeff Young c17b90c8dc Run pinning on sides as well as corners.
Also fixes a bug in LIB_SHAPE's Normalize() which wasn't handling the
upside-down coordinate system.

Fixes https://gitlab.com/kicad/code/kicad/issues/11339
2022-04-07 11:51:58 +01:00
Jeff Young 356d565d48 Normalize rectangular shapes before feeding to point editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/11339
2022-04-06 18:18:29 +01:00
jean-pierre charras be6379a8f6 Fix minor Coverity and compil warnings. 2022-04-01 20:43:21 +02:00
jean-pierre charras 5d9668938b 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-01 10:42:20 +02:00
Jeff Young 7c21a0bdd4 Dirty text render caches in point editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/11284
2022-03-30 16:32:23 +01:00
Jeff Young 8dc680adbb Implement align-to-grid for sheets.
Fixes https://gitlab.com/kicad/code/kicad/issues/11201
2022-03-29 19:31:02 +01: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
Mike Williams 2a726a882f Schematic: new feature, force 45 degree lines
* New modes to force 45 deg angle at beginning or end of line

* Backspace will undo most recent segment added

* / will toggle posture of 90 and 45 degree lines

* Added alg::signbit for convenience

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10869
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9175
2022-03-28 16:07:23 -04:00
Mike Williams e51ab86225 Schematic Drag: fixes and improvements
Fixes:
* Various special cases around junctions on pins and dragging.

* Some rotations of endpoints resulting in a 45 degree rotate.

* Some cases where it was possible to get a line with neither
  endpoint selected, and also substractive unselecting only one of two
  selected endpoints unselecting both.

* Use line midpoint for sorting.  Start and endpoints aren't
  consistent in the order they appear on the X or Y axis. So,
  we need to use the midpoint for our position for consistent
  sorting when dragging groups of parallel lines where some
  have the start and end reversed.

Other:
* Rename TEMP_SELECTED TO SELECTED_BY_DRAG. This is the actual meaning
  of the flag, and should reduce confusion as
  to when it should be used.

* Move usage of TEMP_SELECTED as an algorithmic mark to CANDIDATE
  instead.

* Fix mistaken clearing of START_POINT and ENDPOINT.

* Move endpoint setting and clearing out of narrowSelection, and into
  selectPoint and selectMultiple.

* Don't show dangling end warnings on new lines
2022-03-28 16:02:48 -04:00
Jeff Young 343b2681d4 Midpoints for eeschema rectangles and text boxes.
Fixes https://gitlab.com/kicad/code/kicad/issues/10362
2022-03-28 11:16:39 +01:00
jean-pierre charras 38bd612c01 sch_sexpr_parser.cpp: allows reading a polyline descr with more than 2 points
In symbols, a polyline descr is already a true polyline / polygon descr.
In schematic, a polyline descr was restricted to only 2 points (a line).
A true polyline / polygon descr is now allowed in schematic that support already
polygons.
For compatibility reason, a 2 points polygon (SCH_SHAPE) is converted to a SCH_LINE.
2022-03-27 10:31:21 +02:00
Jeff Young a54457386c Enable immediate mode for pin tool.
Fixes https://gitlab.com/kicad/code/kicad/issues/10156
2022-03-26 21:07:10 +00:00
Jeff Young 0652c7b429 More visible Synchronized Pins Mode informatics.
Fixes https://gitlab.com/kicad/code/kicad/issues/10340
2022-03-26 15:16:08 +00:00
Jeff Young 1c158a4ea4 Use a standard HTML reporter for Symbol Checker. 2022-03-26 14:22:31 +00:00
Wayne Stambaugh 7da7864f5e Fix some Coverity issues. 2022-03-25 15:51:05 -04:00
jean-pierre charras 21144481d2 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
2022-03-22 10:32:36 +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 63b5ad7df1 Fix some issues with global-label fields' bounding boxes. 2022-03-19 19:37:01 +00:00
jean-pierre charras 77c52ad5df Fix a compil warning (shadowed var). 2022-03-17 20:13:17 +01:00
Jeff Young 400cff994d Update value & footprint from clipboard whether keeping annotation or not.
Fixes https://gitlab.com/kicad/code/kicad/issues/11116
2022-03-17 18:19:13 +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
Jeff Young e68e2e973e Separate Line Properties dialog from Bus/Wire, and handle Junctions in Bus/Wire.
Fixes https://gitlab.com/kicad/code/kicad/issues/9979
2022-03-16 14:56:32 +00:00
Jeff Young ec44dfa60f Unescape value fields when pasting from legacy schematics.
Fixes https://gitlab.com/kicad/code/kicad/issues/11124
2022-03-13 22:17:44 +00:00
Jeff Young 1f745b000d Special-case synthetic click after tool selection.
Fixes https://gitlab.com/kicad/code/kicad/issues/11057
2022-03-07 20:30:50 +00:00
Jeff Young 39fa4e2065 Include textbox in movable objects.
Fixes https://gitlab.com/kicad/code/kicad/issues/11058
2022-03-07 10:33:59 +00:00
jean-pierre charras dbfdd3fb56 Fix some Coverity warnings. 2022-03-06 09:48:33 +01:00
Seth Hillbrand 7ecc70a79d 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

(cherry picked from commit 802d20c409)
2022-03-03 16:04:22 -08:00
Seth Hillbrand 548936bb22 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)

(cherry picked from commit 79b6991d7b)
2022-03-02 16:33:28 -08:00
Mike Williams 5503afc09a 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
(cherry picked from commit 7d4cb91f39)
2022-02-28 08:50:12 -08:00
Jeff Young c4d2ac570f Don't allow break commands (or labelling cmds) on multiple wire selections.
Fixes https://gitlab.com/kicad/code/kicad/issues/10934
2022-02-27 23:15:07 +00:00
Seth Hillbrand 535ea800c0 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

(cherry picked from commit a30ad0b54a)
2022-02-25 16:16:15 -08:00