Commit Graph

982 Commits

Author SHA1 Message Date
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
Seth Hillbrand 29c2f3b7d4 Prevent jumping into disambiguation if moved
Moving points should not be overrided by disambiguation menu, so we
track where the disambiguation event started and only trigger the menu
if the mouse hasn't moved a full unit in x/y

Fixes https://gitlab.com/kicad/code/kicad/issues/9132
2021-09-09 16:24:18 -07:00
Wayne Stambaugh 451f8eefc0 Eeschema: fix broken project symbol rescue bug.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9111
2021-09-09 10:21:09 -04:00
Seth Hillbrand c8b2e69332 Check if selection is primary tool
Previously, we were checking if the selection tool was the top of the
stack but this ignored many other "secondary" tools that might be
running such as the point editor.  These still allow the selection tool
to handle events such as clicks.  This change allows the selection tool
to handle clicks when it is the primary tool on the stack rather than
the top

Fixes https://gitlab.com/kicad/code/kicad/issues/9110
2021-09-07 10:42:01 -07:00
Wayne Stambaugh 4ee0b28ffc Coverity issue fixes.
Fix Coverity issues 338623, 338716, and 338717.
2021-09-07 13:38:56 -04:00
Seth Hillbrand 0f38a35531 Be sure to stop the timer when triggering d-click
Some mice apparently trigger double-click without triggering a click, so
stop the timer when we receive this event

Fixes https://gitlab.com/kicad/code/kicad/issues/9106
2021-09-06 12:27:31 -07:00
Seth Hillbrand 240c3b75c4 Move selection disambiguation to long-click
This standardizes selection tools in SELECTION_TOOL class to be able to
handle a long-click as asking for a non-heuristic disambiguation menu.

Fixes https://gitlab.com/kicad/code/kicad/issues/8490
2021-09-05 13:42:51 -07:00
Marek Roszko 74b8f14ec3 Don't find when the dialog isn't open or the search is blank (which resulted in full highlighting)
Fix #9056
2021-09-04 23:48:06 -04:00
Seth Hillbrand b0ba8b01c4 Update RTree when rotating components
Fixes https://gitlab.com/kicad/code/kicad/issues/9061
2021-08-31 16:36:38 -07:00
Seth Hillbrand 345f506f0c Ignore STARTPOINT/ENDPOINT in multiple item rot
Rotating multiple items does not allow for individual end points to be
selected.  This can happen when we narrowSelection by hovering on end
points.
2021-08-31 14:34:05 -07:00
Roberto Fernandez Bautista 3e32c2e5a7 eeschema: Make pasted text left aligned so that it is editable
Previously it was pasted as centre aligned, which is not supported in
the GUI.
2021-08-31 20:02:20 +01:00
Wayne Stambaugh 897269f33f Eeschema: schematic object context menu improvements.
Don't show the clean up sheet pins context menu entry when the selected
sheet doesn't have any pins to clean up.

Remove sheet has no pins to clean up nag dialog now that the context menu
entry isn't shown unless there are pins to clean up.
2021-08-30 11:52:40 -04:00
Jeff Young 6c16846b21 Remove unused lambda. 2021-08-30 13:44:28 +01:00
Jeff Young 9da8f04cb4 Cleanup sheet pins doesn't make any sense when drawing sheets.
Fixes https://gitlab.com/kicad/code/kicad/issues/9044
2021-08-30 13:11:37 +01:00
Seth Hillbrand 871bdbc952 Search sheets in hierarchy-order
Also fixes an issue where multiple sub-sheets were skipped in certain
cases

Fixes https://gitlab.com/kicad/code/kicad/issues/8972
2021-08-27 13:03:18 -07:00
Mike Williams d18d993eac Eeschema: find next key shouldn't launch find dialog
Adds some general cleanups of overridden find functions while I'm in there.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8967
2021-08-27 18:15:36 +00:00
Jon Evans 0463fc4c2b Fix several bugs and refactor schematic saving
Having the logic split between three different paths was
a bit much, this should hopefully be a bit easier to
maintain.  All save logic now goes through SaveProject;
individual file writing is now a private function.

Also change Save As to Save Copy As in project manager
mode, as we don't want to change projects from inside
the editor in project manager mode.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9015
2021-08-23 23:01:08 -04:00
Wayne Stambaugh 1d8fd22cd8 Symbol editor: fix message panel units when selecting from combo box.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8991
2021-08-20 15:45:57 -04:00
Seth Hillbrand 75e4fa9b75 Handle multiple annotation in search
New schematic format needs to search client screen paths instead of
maintaining multiple copies in a flat format.
2021-08-20 10:24:08 -07:00
Seth Hillbrand 729ba1e301 Ensure deterministic Find/Replace ordering
Sorts first by x and then by y when returning search order

Fixes https://gitlab.com/kicad/code/kicad/issues/8972
2021-08-20 08:42:06 -07:00
Jeff Young fc4d748bdc Fix bugs in sheets.
1) Default_line_width is in mils, not IU.
2) Plot sheet fields.

Fixes https://gitlab.com/kicad/code/kicad/issues/8984
2021-08-17 13:21:52 +01:00
Jon Evans 766b67a8f1 Tune selection of wire endpoints near other objects
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8941
2021-08-12 22:04:24 -04:00
Jeff Young 6eb59b9d9e Dialog naming conventions. 2021-08-06 20:54:26 +01:00
Jeff Young 95b87ba29a Freshen microwave polygon dialog and remove a bunch of dead code. 2021-08-03 01:11:11 +01:00
Jeff Young d40712d9d6 Formatting and message consistency. 2021-08-01 21:31:23 +01:00
Jeff Young c716548b29 Enable autoplace whenever sel contains at least 1 field owner.
Fixes https://gitlab.com/kicad/code/kicad/issues/8886
2021-07-29 20:23:56 +01:00
Jeff Young 539d14ce94 Fix hang-over from legacy canvas where we only looked at sel head.
Fixes https://gitlab.com/kicad/code/kicad/issues/8886
2021-07-29 16:52:22 +01:00
Jeff Young 6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Jeff Young f221220fe2 Rename layer ids file.
It hasn't had anything to do with colors or visibility for some time
now.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh f233f4a0a9 Expunge EDA_FILE_SELECTOR.
EDA_FILE_SELECTOR was just an obfuscation of wxFileSelector().
2021-07-28 14:12:51 -04:00
Jeff Young 19de38bbae Avoid Mac-standard Cmd+H as well.
Fixes https://gitlab.com/kicad/code/kicad/issues/8864
2021-07-27 22:26:13 +01:00
Mike Williams 2c766bdb2b Eeschema: fix assigning netclass to buses
Buses with at least one member can use assign netclass functionality to
set all members to that netclass.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8743
2021-07-27 20:48:25 +00:00
Jeff Young dd5676f4bc Implement a safer (RAII) tool re-entrancy guard.
Fixes https://gitlab.com/kicad/code/kicad/issues/8873
2021-07-27 16:37:34 +01:00
Wayne Stambaugh 78e5e98ea0 Pass VECTOR2I objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Wayne Stambaugh 8fd83cbb95 Pass wxPoint objects by reference instead of on the stack. 2021-07-26 15:35:33 -04:00
Mike Williams 13a03f77d3 Eeschema: Fix for delete key in wire tool
Delete key was not working for items selected with wire tool active.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8841
2021-07-25 15:17:49 -04:00
jean-pierre charras 1aadf45947 DIALOG_SHIM: fix not working initial size when creating a dialog.
The first time a DIALOG_SHIM was created, with a given size, this size
was not taken in account. This this is now forced.
(when recreated during a session, this is the last dialog size that is used)
2021-07-24 18:59:28 +02:00
jean-pierre charras dbf17f83ed Minor fixes (DIALOG_DISPLAY_HTML_TEXT_BASE: ensure min size is working). 2021-07-24 17:03:36 +02:00