Commit Graph

680 Commits

Author SHA1 Message Date
Jeff Young a3406e7514 Make snapping more predictable.
In particular, allow grid positions to override line snapping if
they're a better match (and do this independently on x and y axes).
We already allow a nearer anchor to override, but that should be
based on a cartesian distance rather than independent axes.

Fixes https://gitlab.com/kicad/code/kicad/issues/6626
2020-12-04 22:50:30 +00:00
jean-pierre charras c47871e775 EDA_BASE_FRAME::ShowInfoBarMsg: add option to show a close button.
Same for EDA_BASE_FRAME::ShowInfoBarError and EDA_BASE_FRAME::ShowInfoBarWarning
2020-12-04 14:45:14 +01:00
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
2020-12-04 12:48:32 +00:00
Jeff Young e882753ebf Grid snapping fixes.
1) Uniformly honour the GAL grid snap settings
2) Make more uniform use of GRID_HELPERs
3) Smarten EDIT_LINE for mid-point snapping

Fixes https://gitlab.com/kicad/code/kicad/issues/6558
2020-12-03 19:55:58 +00:00
Jeff Young a19028a396 Hook up EE_GRID_HELPER to some more tools.
Also implements EE_GRID_HELPER layers so that connectable things
snap to connectable things and graphics snap to graphics.

Fixes https://gitlab.com/kicad/code/kicad/issues/5641
2020-12-03 15:16:34 +00:00
Jeff Young 43fe228367 Hook up a bit more of the EE_GRID_HELPER.
Fixes https://gitlab.com/kicad/code/kicad/issues/5985
2020-12-02 23:18:33 +00:00
Jon Evans 05609dbc1d Update screen r-tree after mirror operation
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6549
2020-12-01 19:19:12 -05:00
Jeff Young df262eaa06 Make prev/next marker work reliably on all platforms.
Requires us to move from arrow-keys to our own commands (the only
way that the OSX wxWidgets impl doesn't eat the keys when the dataVIew
has focus).

While there we might as well add a command to exlucde markers.

ADDED Prev Marker, Next Marker, Exclude Marker

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

Fixes https://gitlab.com/kicad/code/kicad/issues/5501
2020-12-01 22:37:07 +00:00
Jeff Young 3c521942ed Smarten isEmpty checks to include nothing-but-whitespace.
Fixes https://gitlab.com/kicad/code/kicad/issues/6567
2020-12-01 16:39:06 +00:00
Jeff Young 3ad5bce67f Rewrite connected-lines dragger to not use EDA_ITEM flags.
We had some spurious bugs where both ends would get dragged to a
single point (making them disappear).  While I never caught it
in the debugger, I'm guessing that the flags weren't getting
cleared properly or were getting overwritten or something.  Anyway,
it now uses std::pair instead.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/6431
2020-11-30 19:30:03 +00:00
Roberto Fernandez Bautista 9380d6f533 eeschema page numbers: match ordering in hierarchy navigator to sheet page number ordering
- update hierarchy navigator after any modifications to the SCH_EDIT_FRAME
- do not generate ghost selection events after updating hierarchy tree
- use Human Readable path in SCH_EDIT_TOOL::EditPageNumber
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5760
2020-11-30 16:49:33 +00:00
Jeff Young 3da0ab1a9a Fix a couple of bugs in intersheet references.
1) init reference pages before trying to draw the SCH_FIELDs when
turning intersheet references on

2) don't double redraw because we accidentally cleared the last
hover item on a non-mouse-moved event.

3) make sure the root sheet gets a name for the hypertext menu.
2020-11-29 16:53:18 +00:00
Jeff Young 13c63e3a50 Clearer warning about not back-annotating footprint deletes.
Fixes https://gitlab.com/kicad/code/kicad/issues/6521
2020-11-26 19:30:16 +00:00
Jeff Young c85ef8eb69 Make updating netnames in backannotate more discrete.
Trying to be too smart was producing unexpected results.

Fixes https://gitlab.com/kicad/code/kicad/issues/6480
2020-11-25 22:16:56 +00:00
Ian McInerney d50d728d19 Cleanup compiler warnings 2020-11-25 00:08:09 +00:00
Jeff Young 71ce00c5ce Allow rotation of a single graphic line.
Fixes https://gitlab.com/kicad/code/kicad/issues/6487
2020-11-24 23:40:53 +00:00
Jeff Young 9c7c05c161 Mostly formatting cleanup but a few type-casting cleanups too. 2020-11-24 22:16:41 +00:00
Jeff Young 78b505f36a Count head and tail lists as well.
Fixes https://gitlab.com/kicad/code/kicad/issues/6461
2020-11-23 23:54:54 +00:00
Wayne Stambaugh e91a5b3f81 Symbol editor: prevent derived symbol elements from being moved. 2020-11-23 15:46:03 -05:00
Jeff Young dd60fd47b2 Cleanup and formatting. 2020-11-23 01:10:08 +00:00
Jeff Young 3a4bd6fb8b Fix uninitialized variable. 2020-11-21 20:57:36 +00:00
Jeff Young 1391774f64 Re-factor boundary/courtyard checker error handling.
ADDED Footprint Checker dialog to display the results in.

Fixes https://gitlab.com/kicad/code/kicad/issues/6446
2020-11-21 20:57:35 +00:00
jean-pierre charras 01b6cd08b5 lib_edit_tool.cpp: fix a wxWidgets 3.0.4 compatibility. 2020-11-21 11:56:32 +01:00
jean-pierre charras 64636601b8 Eeschema: fix a Unicode/UTF8 management when pasting items from Clipboard.
Copy to clipboard save items (using S expr description) using wide strings
(not UTF8 encoding).
But Paste from clipboard was not converting the wide string to UTF8 string
when getting the stored data to send it as std::string to the S expr reader.

Fixes #6449
https://gitlab.com/kicad/code/kicad/issues/6449
2020-11-21 10:59:25 +01:00
Jeff Young 9e9946628a Go back to arrow cursor on a cancel (or finish).
Fixes https://gitlab.com/kicad/code/kicad/issues/6421
2020-11-19 20:09:28 +00:00
Jeff Young 99796d359f Honour include-in-board flag when back-annotating.
Fixes https://gitlab.com/kicad/code/kicad/issues/6438
2020-11-19 15:29:53 +00:00
Jeff Young 7c344e9be6 Mirroring for intersheet references. 2020-11-18 23:34:27 +00:00
Jeff Young 293795fd46 Support rotation on intersheet references. 2020-11-18 23:34:27 +00:00
Werni 0e44f5128c Add const specifiers 2020-11-18 19:50:36 +00:00
Jeff Young cb5ec8bce1 Make Eeschema cursors update without waiting for mouse movement. 2020-11-18 17:32:40 +00:00
Jeff Young bd1f262a6b Fix issues with Intersheet Ref highlighting and hover actions. 2020-11-18 17:32:40 +00:00
Seth Hillbrand a4201ea833 Fix crash in libedit
LIB_ITEM is not derived from SCH_ITEM but they share a selection model
2020-11-17 14:28:56 -08:00
Jeff Young 8c5c902fa3 Re-write IntersheetRefs on top of SCH_FIELDs and textVars.
1) Generalize SCH_ITEM owners (SCH_COMPONENT, SCH_SHEET, and now
SCH_GLOBALLABEL)
2) Generalize hypertext items
3) Use SCH_FIELD autoplace infrastructure for placing intersheet
references
4) Use textVar infrastructure for buildin intersheet references.

As an important side-effect this also fixes the undo issues with
intersheet refs.
2020-11-17 16:05:49 +00:00
Jeff Young a207bd97bb Naming conventions. 2020-11-17 16:05:49 +00:00
Jeff Young 6e6e0aa644 Naming conventions (including some component -> symbol). 2020-11-15 20:23:15 +00:00
Jeff Young 6654c03041 Embarking on the next adventure: component -> symbol. 2020-11-15 20:23:15 +00:00
Jeff Young bdbb68f813 MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
Jeff Young 63a54d003e More module -> footprint. 2020-11-13 15:16:24 +00:00
Jeff Young 522d64968e Yet more module -> footprint. 2020-11-13 15:16:24 +00:00
Jeff Young f0d0e17aab Prepare for MODULE -> FOOTPRINT. 2020-11-13 15:16:24 +00:00
Jeff Young 4889f9bb7c Fix typo in net label orientation calculation.
Fixes https://gitlab.com/kicad/code/kicad/issues/6333
2020-11-09 12:07:40 +00:00
Jeff Young bfd8a62852 Formatting and naming conventions. 2020-11-07 18:50:30 +00:00
Jeff Young 91ba002da7 Make sure move machinery gets initialized if we're going to use it.
Fixes https://gitlab.com/kicad/code/kicad/issues/6293
2020-11-06 12:21:31 +00:00
Wayne Stambaugh ae4614bfbd Symbol editor: do not allow paste into derived symbols.
Don't allow select all, copy, cut, paste, or duplicate if the current
symbol is an alias.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6050
2020-11-04 15:00:09 -05:00
Jeff Young 88abcc1287 Fix broken handling of closing ERC dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/6277
2020-11-04 01:08:21 +00:00
Jeff Young 5507575d64 Move ERC dialog to EE_INSPECTION_TOOL and kill when resetting.
Fixes https://gitlab.com/kicad/code/kicad/issues/6111
2020-11-03 20:27:44 +00:00
Jeff Young 4be6a27a39 Report error when pin for backannotate can't be found.
Fixes https://gitlab.com/kicad/code/kicad/issues/6263
2020-11-03 18:53:14 +00:00
Jeff Young 2a8ea25209 Null pointer safety.
Fixes https://gitlab.com/kicad/code/kicad/issues/6263
2020-11-03 15:47:38 +00:00
Jeff Young bd103c133d Don't save junction colours when they're inherited.
Also fixes Edit Text & Graphics Properties to be able to clear
colours from junctions.

Fixes https://gitlab.com/kicad/code/kicad/issues/6018
2020-11-03 14:07:50 +00:00
Jeff Young 92d6988f10 Keep pin positions stable when resizing sheet.
Fixes https://gitlab.com/kicad/code/kicad/issues/6196
2020-10-31 11:49:07 +00:00