Commit Graph

7453 Commits

Author SHA1 Message Date
Marek Roszko 94552ed838 Fix grid cell highlight not functioning on Windows in the symbol pin table
Fixes https://gitlab.com/kicad/code/kicad/issues/9290
2021-10-01 23:44:16 -04:00
Jeff Young ef74421922 Move centering of lib-tree item to idle event.
Fixes https://gitlab.com/kicad/code/kicad/issues/9294
2021-10-01 22:46:14 +01:00
Jeff Young 5f5ee7335d Formatting. 2021-10-01 21:49:14 +01: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
Jeff Young 5d579d14c1 Give intersheet refs a bit more breathing room. 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 b9596a0a5d Update dangling flags in color settings' preview. 2021-09-30 18:53:39 +01:00
Jeff Young c7e6c273b4 Fix missing RTREE update. 2021-09-30 18:53:39 +01:00
Seth Hillbrand 13d913a014 Choose centering after zoom
When we zoom after centering, the screen does not display the item at
the appropriate location until you center again.  Choose the zoom first
to set the appropriate scale before translating the viewport
2021-09-29 16:30:52 -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
Jon Evans 62ef27e372 Remove hard-coded anchor color in eeschema 2021-09-28 20:26:47 -04:00
Seth Hillbrand 2225c4e4ed Replace GetRows() with GetNumberRows() because wx 2021-09-28 10:48:04 -07:00
Seth Hillbrand 880f209563 When deleting pin row, show new highlight
When the user deletes a pin row, they need to see which row is now
selected for them to delete again.  Otherwise, deleting will have
unexpected consequences
2021-09-28 09:29:55 -07:00
Seth Hillbrand 42a21e15f0 Check before dereference
Fixes a crash where the screen was destroyed during new loading but
still gets dereferenced by the UI update.  Also puts defensive checks in
the UI conditions against null configuration settings
2021-09-28 08:42:55 -07:00
Jeff Young f73042fe24 Some minor performance enhancements. 2021-09-28 14:28:35 +01:00
Roberto Fernandez Bautista 7089a837f6 Update Editing Options Panel in eeschema with latest modifier keys
We now use Long Click, Ctrl and Shift (Alt is no longer used)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9234
2021-09-27 21:11:56 +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 c508c89a81 Pretty-up some warning messages. 2021-09-27 13:24:53 +01: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 8636afdc73 Use FocusOnLocation for symbol fields cross-probing too. 2021-09-27 00:23:40 +01:00
Jeff Young 5bf042fcc1 Use individual parameter version of wxExecute.
Fixes https://gitlab.com/kicad/code/kicad/issues/9236
2021-09-26 15:03:06 +01:00
Jeff Young f6571c18cb Formatting. 2021-09-26 11:02:57 +01:00
Jeff Young c9aebb8529 Fix symbol fields sorting.
In the symbol fields table the reference contains only the letter, so
the number must be appended.  Conversely, we don't want the unit suffix
as all units are folded into a single symbol.

Fixes https://gitlab.com/kicad/code/kicad/issues/9238
2021-09-25 21:24:16 +01:00
jean-pierre charras f11687c5e5 Do not allow sheet filename change from DIALOG_SCH_FIELD_PROPERTIES.
It does not work. Changing a sheet filename is complex, and can be
made only in sheet properties dialog.
2021-09-25 18:28:19 +02:00
Jeff Young 0dc585e518 Use different dangling state initialization for wires and graphic lines. 2021-09-25 00:34:51 +01:00
Jeff Young 1b8506c6b6 Default dangling state to true. A wire on it's own is dangling. 2021-09-24 20:59:37 +01:00
Jeff Young 7901d705ba Fix optimization to not fetch all possible endpoints for non-connectable. 2021-09-24 20:08:42 +01:00
Jeff Young fad385785d Fix botched merge. 2021-09-24 20:08:29 +01:00
Jeff Young a1a2076aee Include pin roots for symbols that don't have well-defined bodies.
Fixes https://gitlab.com/kicad/code/kicad/issues/8508
2021-09-24 16:19:54 +01:00
Jeff Young a4f83073e3 Use RTree to optimize searches.
Should produce an order of magnitude speedup on dangling end tests
in some documents.
2021-09-24 12:42:22 +01:00
Jeff Young 2d72ccb6ae Simplify dangling end stuff a bit and remove graphic lines from it. 2021-09-24 12:19:27 +01:00
Marek Roszko d39f79b55b Fix schematic custom paper size check to use same limits as rest of eeschema
Fix #9223
2021-09-24 00:46:02 -04: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
Jeff Young 469d3ea329 Don't add global labels when a power symbol is connected.
Fixes https://gitlab.com/kicad/code/kicad/issues/7497
2021-09-20 21:31:19 +01:00
Jeff Young ae8f817938 Use consistent label size and fix issues with rotation.
Fixes https://gitlab.com/kicad/code/kicad/issues/5950
2021-09-20 21:31:19 +01:00
Jeff Young 40b4e5c024 Formatting. 2021-09-20 21:31:19 +01:00
Seth Hillbrand c67d560538 Remove unused and shadowed variables 2021-09-20 11:45:27 -07:00
jean-pierre charras fada53d90c Fix SCH_SCREENS::HasNoFullyDefinedLibIds(): incorrectly returned true if no symbol found.
Fixes #9195
https://gitlab.com/kicad/code/kicad/issues/9195
2021-09-20 18:29:26 +02:00
Jeff Young 6e7ce09572 Use more descriptive terminology for preferred text editor.
Also improves execution to allow the preferred editor to include
parameters, such as "/usr/bin/open -e".

Fixes https://gitlab.com/kicad/code/kicad/issues/9131
2021-09-19 15:17:26 +01: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 0400c0a775 Prevent crash with RTree modification invalidating iterator. 2021-09-19 11:34:43 +01: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 4779850c10 Add done messages to various plotters.
Fixes https://gitlab.com/kicad/code/kicad/issues/9172
2021-09-18 10:39:57 +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
Jeff Young d32ca5b287 Fix bus validation.
Bus groups must be checked first as they can contain vectors inside
them.
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 d7bfd1eb77 Restore use of floating point precision in pin name/number placement.
It's actually required here to get the shadows centred directly under
the text.
2021-09-17 12:37:53 +01:00
Jeff Young b10f337299 Don't auto-zoom when page settings were cancelled.
Fixes https://gitlab.com/kicad/code/kicad/issues/8978
2021-09-17 12:37:53 +01:00
Wayne Stambaugh d90094de39 Fix progress dialog main frame focus issue on Linux.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8718
2021-09-16 15:53:18 -04:00
Jeff Young 2479e1d7b1 Improve common settings property grouping.
Also moves apply-icon-scaling-to-fonts to its own checkbox.  (We used
to try to infer when to do it, but that turns out to be a rathole.)
2021-09-16 18:31:44 +01:00
jean-pierre charras 8aa7e8d9f4 Fix compil warning (shadowed vars) 2021-09-16 18:21:07 +02:00
Wayne Stambaugh 4663da4709 Eeschema: don't escape document file alias names in legacy plugin.
Escaping the document file (.dcm) alias names breaks the link between the
document file and the library (.lib) file.  This causes the information in
the document file to be lost.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9130
2021-09-16 09:09:44 -04:00
Jeff Young 684d15895c Box highlighting of selected text was never finished.
In particular, pin numbers and names weren't done.
2021-09-15 21:17:18 +01:00
Jeff Young e2ce2e6ca9 Correct slight misalignment in Library Link fields. 2021-09-15 21:17:18 +01:00
Seth Hillbrand ca6e43d1e1 Fix segfault when discarding changes on open
When opening new schematic, the undo/redo list is invalidated.
CleanupSchematic uses it before presenting the new schematic to the
user, so we need to make sure that old data are not preserved here past
their pointer lifetimes
2021-09-14 16:41:25 -07: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
Jeff Young 3b121359ae Fix a couple of escape-string issues.
Fixes https://gitlab.com/kicad/code/kicad/issues/9167
2021-09-14 18:30:19 +01:00
Seth Hillbrand 4b436fb86d Narrow down collector
RTree keeps track of position as well.  We can use this to reduce the
amount of time spent in the collector routine
2021-09-13 20:24:07 -07:00
Seth Hillbrand 1c409ff90a Fix typo in previous commit 2021-09-13 20:23:52 -07:00
Seth Hillbrand 2fdd805eda Override SCH_GLOBALLABEL::HitTest
Global labels can optionally have intersheet references.  When enabled,
they expand the bounding box of the label.  Because they can be far away
from the actual label, the bounding box is not a good approximation for
the hittest
2021-09-13 19:55:48 -07: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
Jeff Young efc9279a19 Fix unfortunate line-break. 2021-09-13 13:28:05 +01:00
Jeff Young 52f99e41e6 Fix merge screw up. 2021-09-12 22:57:25 +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
Jeff Young a5247471f7 Expunge a bunch more fixed font specs from wxFormBuilder files.
Also removes the -1 sizing of the status bar on GTK and MSW.

Fixes https://gitlab.com/kicad/code/kicad/issues/8608
2021-09-12 13:53:12 +01:00
Jeff Young 9c78e4cf54 Mac needs different font size handling than MSW & GTK.
Mac already uses diverse font sizes (for instance, smaller fonts for
radio button groups), and the anti-aliasing is a lot better.  The
other platforms need a more limited range of sizes.

Fixes https://gitlab.com/kicad/code/kicad/issues/8608
2021-09-11 23:40:31 +01:00
Roberto Fernandez Bautista 625e56676a Add progress reporting to CADSTAR Schematic & PCB importers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8685
2021-09-11 17:50:19 +01:00
Jeff Young fbee62fc15 Tie font size scaling to when automatic icon scaling fails.
It appears that SetSymbolicSize() and ConvertDialogToPixes() fail
under the same circumstances.
2021-09-11 15:29:51 +01:00
Jeff Young c736bd3fd0 Patch Altium import of oddly constructed line segments.
Fixes https://gitlab.com/kicad/code/kicad/issues/8974
2021-09-11 15:29:51 +01:00
Jeff Young 09ddcdbbca Fix logic error setting bold text.
(Reported on Forum.)
2021-09-11 12:01:41 +01:00
Jeff Young 7a822b55aa Another round of changes to attempt to fix the GTK font size issue.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
2021-09-10 15:59:50 +01: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
Jeff Young 5325dce862 Naming consistency with DRC reports.
Fixes https://gitlab.com/kicad/code/kicad/issues/9121
2021-09-09 13:37:57 +01:00
Sylwester Kocjan fe608bfcef eeschema, sim: clean signal list when last panel is closed
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9119
2021-09-09 01:11:47 +00:00
Mikolaj Wielgus 1c9e10f34e Disable simulator notebook splitting
Using this feature freezes the simulator.
2021-09-09 01:07:23 +00:00
Sylwester Kocjan f9c5c97f74 eeschema, sim: fix wrong names of the signals
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9062
2021-09-08 23:15:29 +02:00
Jeff Young f013dbc7c4 More uniform handling of status fonts.
Fixes https://gitlab.com/kicad/code/kicad/issues/8608
2021-09-08 21:34:22 +01: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
Wayne Stambaugh 41c7089417 Minor dialog layout improvements. 2021-09-07 08:06:02 -04:00
Jeff Young 9cf7c7800b Use same text positioning algorithm in LibEdit and Eeschema.
Also fixes some uninitialized variables in PCB painter.

Fixes https://gitlab.com/kicad/code/kicad/issues/8947
2021-09-07 12:33:06 +01:00
Jeff Young ad7275f0a3 Repair saving of default line styles.
Note that the file format version was NOT bumped because we were
correctly reading the default, just no writing it.

Fixes https://gitlab.com/kicad/code/kicad/issues/9045
2021-09-07 00:14:18 +01:00