Commit Graph

1019 Commits

Author SHA1 Message Date
Jeff Young 40b4052ad4 Improve text hittesting in schematics.
Text has a fairly big bounding box to account for descenders, overbars,
etc., but it makes it feel too sloppy for hittesting.  This change
allows selection disambiguation to look at the actual strokes of the
text when deciding what's "closest".

Fixes https://gitlab.com/kicad/code/kicad/issues/9506
2021-11-01 21:13:12 +00:00
Jeff Young 9f806d9304 Don't assume the grid size.
Fixes https://gitlab.com/kicad/code/kicad/issues/9013
2021-11-01 15:26:39 +00:00
Jeff Young f345eacf13 Be more careful with undo, and don't re-merge a bus over a bus entry.
Fixes https://gitlab.com/kicad/code/kicad/issues/9475
2021-10-30 19:58:09 +01:00
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"
2021-10-30 18:14:23 +01:00
Jon Evans d426abafd7 Handle empty shape in removeCornerCondition
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9495
2021-10-30 13:10:12 -04:00
Jeff Young b967610e05 Remove confirmation for De Morgan (and spell his name right).
Fixes https://gitlab.com/kicad/code/kicad/issues/9483
2021-10-29 20:30:37 +01:00
Jeff Young 1fa9ad227a Repair new junction logic for crossing wires.
Fixes https://gitlab.com/kicad/code/kicad/issues/9484
2021-10-29 19:09:02 +01:00
Seth Hillbrand 18318c73b5 Fix swapped parameters 2021-10-27 08:59:39 -07:00
Seth Hillbrand dd99b2dc2f Add action to edit symbol from Library
Analog of ea4e06124e for symbol editor.  Allows scripting to open
library symbol
2021-10-26 12:59:59 -07:00
jean-pierre charras 29756278e0 eeschema: fix crash when the simulator frame is open and the Tune tool is actived.
In some cases when the Tune tool is actived and a symbol is selected, if the tool
is deactivated from the right toolbar in Eeschema, Eeschema crashes.
2021-10-22 20:00:14 +02:00
Jeff Young c5e5d8e0d4 Fix multi-sheet find/replace issues.
1) When replacing symbol fields, make sure we do it for all sheets
2) Honour "find on current sheet only"

Fixes https://gitlab.com/kicad/code/kicad/issues/9431
2021-10-20 18:28:57 +01:00
Jeff Young b8d193485d Respect selection reference point when set.
Fixes https://gitlab.com/kicad/code/kicad/issues/8520
2021-10-18 18:09:40 +01:00
Jeff Young f9861b4a6c Finish arc rework and push out to file formats. 2021-10-15 12:45:43 +01:00
Jeff Young b52529521e Replace individual LIB_* shapes with LIB_SHAPE (based on EDA_SHAPE).
Also moves to more capable FILL_T model that can be shared.
2021-10-15 12:45:43 +01:00
Mikolaj Wielgus 5f53019290 Substitute all wxHtmlWindow with HTML_WINDOW
Remove other places where <body> tag is used to override the default
black-on-white theme.
2021-10-12 07:07:15 +00:00
Seth Hillbrand 2c7da5e2bd Handle deleting segment
Edited point needs to clear to allow us to use the click timer for
left-click after the drawing is deleted.

Fixes https://gitlab.com/kicad/code/kicad/issues/9320
2021-10-06 10:21:04 -07:00
Seth Hillbrand bb5c58b3cf Set default force cursor off in auto-lines
Leaving the forced position on results in the auto-line linking to a pin
for far longer than we intend if there are other hits in the area of the
cursor

Fixes https://gitlab.com/kicad/code/kicad/issues/9321
2021-10-05 20:28:05 -07:00
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
2021-10-05 20:13:15 -07:00
Seth Hillbrand 9a8d1246cc We don't keep a CHANGELOG.TXT
Direct interested readers to AUTHORS.TXT instead.
2021-10-05 19:46:53 -07:00
Jeff Young f606679164 Proper numeric sorting for intersheet refs.
Also expunges the horrifically named std::remove and std::remove_if
(neither of which remove anything).
2021-10-01 18:29:21 +01:00
Seth Hillbrand dd1d36d40a Fix segfault when check for editing points
The point editor is not always available when checking for points.  We
need to handle the missing tool without crashing
2021-09-30 17:25:33 -07:00
Jeff Young 12b726ba2f Prevent the point editor from fighting with other tools.
1) Don't start a long-click timer when the point editor is active.
2) Don't auto-start a wire when the point editor is active.

Fixes https://gitlab.com/kicad/code/kicad/issues/9270
2021-09-29 19:16:06 +01:00
Jeff Young 9cf9abbd66 Don't allow Text Properties dialog on intersheets references field. 2021-09-29 16:04:36 +01:00
Mike Williams d90dc77e00 Selection: Don't drop small moves
If we do a real drag, the timer will be cancelled. If we don't, then
the user is still holding the mouse button down and would probably like
to see the menu. Otherwise it appears the action is dropped.
2021-09-27 16:44:32 +00:00
jean-pierre charras d362cbc530 EEschema: change Save Copy As... to Save Current Sheet Copy As...
Save Copy As did not work with hierarchies (was not able to manage subsheets)
Fixes #9245
https://gitlab.com/kicad/code/kicad/issues/9245
2021-09-27 18:23:11 +02:00
Jeff Young 5f3c67bd2b Fill in some missing GetMsgPanelItems and make some others consistent.
Also expunges a std::vector<MSG_PANEL_ITEM> cover type.
2021-09-27 00:23:40 +01:00
Jeff Young 42687f5d9d Give selection preference to pins over wires.
Fixes https://gitlab.com/kicad/code/kicad/issues/9063
2021-09-23 23:59:20 +01:00
Jeff Young 9ea6b44ee8 Formatting. 2021-09-23 23:59:20 +01:00
Marek Roszko 064ab933dd Always update the hierarchy navigator when setting the current sheet in the frame
Fix #9221
2021-09-23 18:14:44 -04:00
Seth Hillbrand 71602475eb Allow rotate/mirror even when dragging
Keeps the lines connected but doesn't solve the crossed-wire mixups.
This allows common usage (mirroring labels/rotating segments) and leaves
prevention of the crossed wires to the user.

We can't really prevent crossed wires when rotating e.g. a part with
wires connected to 4 sides and users will not expect that.  But we
should not disable useful features like mirroring multiple parallel
items to avoid a known impossible situation

Also provides an alternative solution to 345f506f0c that allows us to
rotate groups without destroying connections on hover

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

Fixes https://gitlab.com/kicad/code/kicad/issues/8523
2021-09-23 14:47:49 -07:00
Jeff Young 4b38bd1543 Favour junction dots to wires inside the dot.
Fixes https://gitlab.com/kicad/code/kicad/issues/9187
2021-09-23 22:13:56 +01:00
Jeff Young 552f053a55 Remove pins from symbol hit-testing.
Fixes https://gitlab.com/kicad/code/kicad/issues/8508
2021-09-23 22:07:51 +01:00
Seth Hillbrand 671aec5da6 In fallback selection, handle cancelled menu
doSelectionMenu returns false to indicate a cancelled menu.  This needs
to be handled in selectPoint when directly accessing doSelectionMenu in
the same manner as SelectionMenu() events

Fixes https://gitlab.com/kicad/code/kicad/issues/9218
2021-09-23 11:48:29 -07:00
Seth Hillbrand 3b04b602d9 Don't walk text/labels when mirroring
We have a fixed bottom-align for the text and labels in eeschema.
Therefore, mirroring vertically needs to account for the text's offset
from the bounding box center.

Fixes https://gitlab.com/kicad/code/kicad/issues/9208
2021-09-22 09:24:16 -07:00
Jeff Young ec2ac181a2 Further simplify selection logic.
The select-single-wire stuff is no longer needed, and the prefer-wire-ends
stuff needs to be distance-based.

Also improved wire hit-testing to include bubbles the size of the dangling
symbol at each end.

Fixes https://gitlab.com/kicad/code/kicad/issues/9187
2021-09-21 20:27:35 +01:00
Jeff Young 2ec1c215cd Drop selection after hiding items.
Fixes https://gitlab.com/kicad/code/kicad/issues/8605
2021-09-21 17:02:34 +01:00
Seth Hillbrand c67d560538 Remove unused and shadowed variables 2021-09-20 11:45:27 -07:00
Marek Roszko e7814915db Call UpdateHierarchyNavigator on find jump in schematic in case we cross pages
Fix #8971
2021-09-19 08:35:51 -04:00
Jeff Young a5c4bace60 Improve (and simplify) wire and pin hit-testing.
1) Expand the accuracy to at least the grid spacing
2) Move pin-selects-symbol logic to Selectable()
3) Recode pick-closest algorithm to handle exactHits and inexactHits
separately
4) Remove pin target from bounding box in favour of expanding it to
at least as wide as the pin decoration (this prevents the accuracy
off the end of the pin from growing too large)
2021-09-19 11:34:43 +01:00
Jeff Young a291cae2fd Make sure intersheetRef bounding boxes get updated in RTree.
Fixes https://gitlab.com/kicad/code/kicad/issues/9177
2021-09-18 18:32:19 +01:00
Jeff Young 4b3490a2b9 Intercept rotate command when drawing wires.
If unfolding from bus rotate the label; otherwise beep.

Fixes https://gitlab.com/kicad/code/kicad/issues/9178
2021-09-17 22:01:17 +01:00
Jeff Young 5c07441e24 Remove Setup Dialog assignment of netclasses to buses.
Also removes the message bar display of assigned netclass for
buses and bus-to-bus entries.

Also fixes a bug where assigning a netclass via the canvas only
looked at the first level of bus members (and not any nested
members).

Also fixes a bug where the bus name validator tried to validate
a vector bus first -- which doesn't work as a vector bus may be
nested in a group bus.

Also fixes a bug where we were failing to check for illegal
chars in bus definitions which otherwise passed the bus parsers.

See additional comments in the bug report.

Fixes https://gitlab.com/kicad/code/kicad/issues/9160
2021-09-17 22:01:17 +01:00
jean-pierre charras ca33ec05df Eeschema: fix incorrect rotation (CW versus CCW) of some items.
For some (not all) items and for blocks the rotation CCW was in fact a CW rot.
Fixes #9176
https://gitlab.com/kicad/code/kicad/issues/
2021-09-17 18:30:23 +02:00
Jeff Young cc14dfe3ca Make canvas netclass assignment mirror Setup Dialog assignment.
While it would make more sense to have them both use the old canvas
algorithm (of only assigning to the members), I'd be *very* hesitant
to change the Setup Dialog and underlying machinery this late in the
6.0 release.

Fixes https://gitlab.com/kicad/code/kicad/issues/9160
2021-09-17 14:40:12 +01:00
Jeff Young b84d1456d5 KIFACE_I -> KIFACE_BASE. 2021-09-14 23:45:14 +01:00
Jeff Young 3aae3c6f65 Dark mode for a bunch of HTML dialogs.
WX_HTML_REPORT_BOX
WX_HTML_REPORT_PANEL
HTML_MESSAGEBOX
DIALOG_DISPLAY_HTML_TEXT

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

Fixes https://gitlab.com/kicad/code/kicad/issues/9156
2021-09-14 21:23:57 +01:00
Seth Hillbrand 484eaa01b9 Try harder to avoid loop contention
We have two cases where we might be requesting a disambiguation menu.
In one case, we already have the event loop waiting and we need to run
the selectionMenu through the action system.  In the other case, the
tool isn't on the stack and won't activate.  Here we need to run
directly and we are assured of not crashing because the tool isn't
active.

Fixes https://gitlab.com/kicad/code/kicad/issues/9154
2021-09-13 10:17:04 -07:00
Jeff Young fdfecf5932 Don't push view control settings to the previous active tool.
See further comments in bug report.

Fixes https://gitlab.com/kicad/code/kicad/issues/9147
2021-09-13 13:28:05 +01:00
Jon Evans 558ba855a2 Copy default hotkey for Clear Highlight from pcbnew to eeschema 2021-09-12 17:38:02 -04:00
Jon Evans ed342d0cc0 Do not clear highlighting on a cancel event
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9035
2021-09-12 17:35:44 -04:00