Commit Graph

12580 Commits

Author SHA1 Message Date
Jeff Young 90eff6c6a2 Prevent assert when sorting non-existant layer. 2021-10-23 11:53:03 +01:00
Roberto Fernandez Bautista 987d64c88e pcbnew graphics import: Fix arc winding direction 2021-10-23 11:02:00 +01:00
Jeff Young fecb53b64f Clean up removal of separate front & back footprint text visibility.
Fixes https://gitlab.com/kicad/code/kicad/issues/9441
2021-10-22 21:14:15 +01:00
Seth Hillbrand d44e0ab765 Limit use of non-copper layers
When importing, we should not use Eco1 for other purposes as the
importer uses it to place unknown layer objects.  We also need to avoid
placing objects on the courtyard layers that do not relate to the layer
purpose in DRC

Fixes https://gitlab.com/kicad/code/kicad/issues/9442
2021-10-22 12:31:11 -07:00
Jeff Young 8cbdf5ba12 Keep default pad number up-to-date (in both directions).
Also hides the net selector when in the footprint editor as it has
no meaning there.  (We still only grey it out for the board editor
when the pad type has no net to keep things from coming and going too
much.)

Fixes https://gitlab.com/kicad/code/kicad/issues/9317
2021-10-22 19:58:36 +01:00
Floris Lambrechts 06b9d774c0 Expose PCB_TRACK vector as a SWIG proxy object
Allows to use Connectivity `GetConnectedTracks()` in Python.

This is in line with `GetConnectedPads()`, and with pcbnew v5.1 where
GetConnectedTracks was also usable from Python.

Fixes https://gitlab.com/kicad/code/kicad/issues/9435
2021-10-22 16:00:18 +00:00
jean-pierre charras 0bdb424215 FootprintWizardBase.py: fix Arc building due to recent code changes.
Add a arc_test wizard (only to test arcs in fp).
2021-10-22 10:07:31 +02:00
Jeff Young 6c0110ecd3 Naming conventions.
There's nothing "legacy" about the OpenGL 3D renderer.
2021-10-21 14:30:03 +01:00
Jeff Young 0fd762dc25 Make 3D dialogs easier to find. 2021-10-21 14:30:03 +01:00
Wayne Stambaugh 0795fcb810 Minor dialog layout fixes. 2021-10-21 08:59:55 -04:00
Jeff Young b1f17dc927 Don't let the polygon routines collapse on a zero line width.
Fixes https://gitlab.com/kicad/code/kicad/issues/9418
2021-10-20 12:29:07 +01:00
qu1ck 09a2701136 Fix arc angle calculation and python API for it
1. It's impossible to use methods that modify parameters in swig so
I extend it in wrapper
2. Simplify GetArcAngle() and fix the bug where it lies about 360
degree arc to be 0 degrees.
2021-10-20 10:38:42 +00:00
Jeff Young 463b82cf46 Be very careful when "doing what I mean".
Just wanting a SMD pad isn't enough -- the user may have already
set SMD settings into the master pad and changing the SizeX is
then very unexpected.  Make sure the settings directly conflict
before making any "do what I mean" adjustments.

Also fixes the parent-footprint info when no parent exists.

Also gives a better title to the dialog when used to edit the masterPad
properties.

Fixes https://gitlab.com/kicad/code/kicad/issues/9427
2021-10-20 08:59:25 +01:00
jean-pierre charras b37664092d DIALOG_GLOBAL_DELETION: enable graphic items filters when board outlines is enabled. 2021-10-20 09:16:40 +02:00
Seth Hillbrand 2a6c73b8df Check for hole before highlighting
Fixes https://gitlab.com/kicad/code/kicad/issues/9423
2021-10-19 11:25:00 -07:00
Jeff Young 57f907f6e7 Make sure PCB_PARSER is fully initialized between footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/9424
2021-10-19 17:14:04 +01:00
jean-pierre charras 40e6a9a926 Fp editor: add DRC test for through hole pads without hole. 2021-10-19 14:47:29 +02:00
Seth Hillbrand fb5fef9f5f Remove extraneous Raise() from DRC cross-probe
Scroll-to-show on GTK relies on the idle handler but this is interrupted
by a Raise and not revisited.  Since the Dialog is always on top of the
editor, Raise is not needed to view the referenced error

Fixes https://gitlab.com/kicad/code/kicad/issues/7246
2021-10-18 17:16:36 -07:00
Seth Hillbrand 5af813c69f Remove extra handler
The extra handler intercepted the action before it could be handled
properly changing the board design settings

Fixes https://gitlab.com/kicad/code/kicad/issues/9410
2021-10-18 15:08:22 -07:00
Seth Hillbrand 29b851dce1 Tighten up ecea2e4279 2021-10-18 13:44:19 -07:00
Mark Hämmerling ecea2e4279 pcbnew: Add window title to "Find" dialog 2021-10-18 20:39:37 +00:00
Seth Hillbrand e9205a0740 Fix mistaken comparison in highlighting
Need to compare between elements colliding

Fixes https://gitlab.com/kicad/code/kicad/issues/9413
2021-10-18 13:38:27 -07:00
Jeff Young 856cc26d4c Allow vias the same same-net waiver that pads have for hole clearance
Note that in 7.0 we have physical_hole_clearance rules to give a bit
more expressivity here.

Fixes https://gitlab.com/kicad/code/kicad/issues/9420
2021-10-18 18:09:40 +01:00
Jeff Young 0826c26a18 Fix a few minor dialog issues. 2021-10-18 18:09:40 +01:00
Seth Hillbrand 10ac675905 Fix shadowing 2021-10-18 09:00:24 -07:00
jean-pierre charras cee9e417ec Fix mirroring arcs in footprints
Fixes #9417
https://gitlab.com/kicad/code/kicad/issues/9417
2021-10-18 17:10:39 +02:00
Ian McInerney 5817a8b5f4 Remove unused m_host variable
This variable isn't needed anymore after 5f53019290
pushed dark mode handling into the HTML window itself.
2021-10-18 00:29:40 +01:00
Roberto Fernandez Bautista 99442350a4 CADSTAR PCB: Fix loading of arc tracks following recent PCB_ARC changes
We no longer have any knowledge of the original start/end of the arc,
since SetArcAngleAndEnd swaps the start and end to ensure the arc is
always clockwise at the end.

Adds a method EDA_SHAPE::EndsSwapped() to notify whether the start/end
point of the shape were swapped.
2021-10-17 17:57:51 +01:00
qu1ck 6db0216dd4 Bring back python compatibility constants for SHAPE_T
They were removed in a41944020d
and that broke a lot of stuff.
2021-10-17 03:21:47 -07:00
jean-pierre charras b44a14a472 Plot custom pads with pad anchor size = 0.
A pad anchor size = 0 is allowed in 5.99 version (not in 5.1 versions)
Fixes #9408
https://gitlab.com/kicad/code/kicad/issues/9408
2021-10-17 11:01:38 +02:00
Roberto Fernandez Bautista e867a4fd27 CADSTAR PCB: Fix Zone fill priorities
The algorithm now correctly determines fill priorities when the zone
outlines are close together and within the minimum clearance between
zones.
2021-10-16 21:50:56 +01:00
Seth Hillbrand 57d0cbcefa Fix python QA 2021-10-15 13:50:36 -07:00
Seth Hillbrand b88473e41f Respect context layer in eval
When testing for a specific layer context, we should only return true if
the item either exists on that layer or if the context layer is
UNDEFINED_LAYER, meaning the layer value is not material to the test

Relates to https://gitlab.com/kicad/code/kicad/-/issues/9366
2021-10-15 10:35:29 -07: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
Jeff Young 9b9e379aa0 Overhaul arc internal model to not over-specify information. 2021-10-15 12:45:43 +01:00
Jeff Young 8b08c9e53f Shorter names before things get out of hand.
Also, remove comments indicating CURVE is a Bezier.  Just call it a
BEZIER.
2021-10-15 12:45:43 +01:00
Jeff Young a41944020d Push most of PCB_SHAPE impl down in to EDA_SHAPE. 2021-10-15 12:45:43 +01:00
jean-pierre charras 0533196294 Fix Coverity warnings 2021-10-15 09:24:16 +02:00
Seth Hillbrand faba2b06c2 Lock track width after placing segment
We don't want to allow the full track width to change after placing a
segment when we are in follow-segment mode. This would require either
ripping up and re-solving the existing track or allowing potential DRC
errors.

Fixes https://gitlab.com/kicad/code/kicad/issues/9395
2021-10-14 09:21:14 -07:00
Seth Hillbrand 07b9e2ee51 Fix errant debug message
__WXDEBUG__ is only for internal WX debugging and is always enabled even
on release builds because it is defined to be 0, 1 or 2.  Use DEBUG to
limit to debug builds

Fixes https://gitlab.com/kicad/code/kicad/issues/9392
2021-10-13 09:16:55 -07:00
Seth Hillbrand 95ec23247c Initialize zone vars in CTOR 2021-10-13 08:59:48 -07:00
Seth Hillbrand 5a6f230a2c Delete full track needs proper scoping
This should not run if the action is "Cut".  Additionally, we need to
transfer the expanded selection to selectionCopy in order for it to
proceed with the deletion.  There is also no need for this to be limited
to the Hover action, so this section was removed.

Fixes https://gitlab.com/kicad/code/kicad/issues/9385
2021-10-12 13:47:16 -07:00
Seth Hillbrand 35e90d0cf4 Allow changing router mode while routing
Keeps shove active even when not using to allow switching modes during
routing.

Fixes https://gitlab.com/kicad/code/kicad/issues/9342
2021-10-12 09:55:34 -07:00
Seth Hillbrand 7f1247a23c Update track width when changed
Tracks starting from pads should change in response to the track width
changing despite having the "follow existing track" width selected.
2021-10-12 09:55:34 -07: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 1b7358f93a Import layer settings before swapping boards
The rebuildLayerStackPanel() reads from the current board to setup the
panel.  We maintain the board swap until after the setup is completed

Fixes https://gitlab.com/kicad/code/kicad/issues/9370
2021-10-11 11:47:22 -07:00
Seth Hillbrand 58f553a9ca Check for layer when DRC on vias and non-zone items
We were already checking for zone-zone overlap but missing checks when
running against (possibly) buried vias as well as the general check

Fixes https://gitlab.com/kicad/code/kicad/issues/9366
2021-10-11 10:33:50 -07:00
Seth Hillbrand fce054319c Update DRC MatchDPSuffix routine
This matches the router matchDPSuffix routine until we merge the two
into a common utility
2021-10-11 10:33:50 -07:00
Roberto Fernandez Bautista 43e59b0ea7 CADSTAR PCB: Correctly handle associated pad ids and PCB Only pads
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9372
2021-10-11 18:30:20 +01:00
Roberto Fernandez Bautista 7a71ebf9ac CADSTAR PCB: Load all three net properties into a single Netclass
The final netclass name will be a bit long but it will allow for custom
DRC rules to individually target each of the three properties available
in CADSTAR:
- Route Code (which specifies width of the track in min, max, opt)
- Net class (only used in signal integrity analysis)
- Spacing class (for specifying clearance requirements between classes)
2021-10-10 22:16:08 +01:00
Roberto Fernandez Bautista e9030283cc Fix formatting 2021-10-10 22:16:08 +01:00
Seth Hillbrand 93bbad6acf Allow snapping in pickReferencePoint
Fixes https://gitlab.com/kicad/code/kicad/issues/9354
2021-10-10 08:53:10 -07:00
Seth Hillbrand 62cb5d9354 Fully cancel copy with reference
Tool needs to be popped when cancelling to allow selection tool to work properly.

Fixes https://gitlab.com/kicad/code/kicad/issues/9353
2021-10-10 08:31:18 -07:00
Ian McInerney 4d89061d4c Support footprint arcs in convert to polygon
Fixes https://gitlab.com/kicad/code/kicad/issues/9352
2021-10-10 16:26:23 +01:00
Seth Hillbrand 6620831d38 Clear edited point when exiting point editor
Failing to clear this will prevent selection where tools check for
edited points before processing mouse button down events

Fixes https://gitlab.com/kicad/code/kicad/issues/9357
2021-10-10 08:25:50 -07:00
Roberto Fernandez Bautista 0fa8e1f311 DRC Control: Clear pointer to MARKER after it has been centered
Also, added asserts to verify SelectMarker and CenterMarker actually
do select one.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9344
2021-10-10 16:22:04 +01:00
jean-pierre charras 593324bbaa Do not use non ASCII7 chars in English strings.
Fix UTF8 to unicode conversion issue.
Fixes #9356
https://gitlab.com/kicad/code/kicad/issues/9356
Fixes #9355
https://gitlab.com/kicad/code/kicad/issues/9355
2021-10-10 10:32:31 +02:00
Roberto Fernandez Bautista ac3ade874e CADSTAR PCB: Set Copper-to-Hole clearance as 0
Testing suggests that CADSTAR doesn't actually have any clearance to the
hole (other than electrical clearance to the barrel of the padstack/
viastack).

This removes a large amount of DRC violations on imported designs.
2021-10-10 00:20:13 +01:00
Roberto Fernandez Bautista eb7d0fdf8a CADSTAR PCB: Use board clearance + additional isolation as zone clearance
Copper-to-copper clearance is too onerous and results in large amount
of DRC errors for the majority of imported designs.
2021-10-10 00:18:36 +01:00
Roberto Fernandez Bautista f4ff01a5ab CADSTAR PCB: Copy default netclass settings when creating new ones
Ensures that the global clearance is preserved in the newly created
netclass.
2021-10-09 23:10:55 +01:00
Seth Hillbrand 41e7284fdc Speed up pcbnew loading/updating
Rather than detaching and re-attaching the layer panels with the
attendant overhead, we keep each panel intact and only update its
contents.  Since the bindings are the same, this saves substantial time
on pcb loading as well as when closing the board setup dialog
2021-10-09 13:38:35 -07:00
Roberto Fernandez Bautista 8f74085ca4 CADSTAR PCB: Handle older boards without construction layers
Use KiCad default stackup for older CADSTAR boards that do not
define any dielectric layers between the electrical layers.

Also fix default stackup calculation to ensure finished board thickness
is 1.6mm
2021-10-09 21:26:16 +01:00
Roberto Fernandez Bautista d62a5ecf46 Remove unused GetPcbThickness() function in PANEL_SETUP_BOARD_STACKUP
The function used now is computeBoardThickness()
2021-10-09 20:35:10 +01:00
Roberto Fernandez Bautista 33a3cfc87b CADSTAR PCB: Update Board Design Settings to notify that a stackup exists
Also update thickness of the PCB

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9307
2021-10-09 20:33:14 +01:00
Roberto Fernandez Bautista e80a1c2679 CADSTAR PCB: Don't load items on invalid layers
This was happening in two cases:
- Loading documentation symbols (CADSTAR on purpose defines these in an
  invalid layer)
- When an item was in a "layer set" such as ALLELEC or ALLLAYER - need to
  make sure we remove the copper layers that are not active in the design
2021-10-09 20:07:23 +01:00
Ian McInerney 895f4ca989 Cleanup 3D model filename validation
Don't veto the changed event anymore and instead just display the
feedback in the error column of the grid.
2021-10-08 22:30:20 +01:00
Ian McInerney 8d71bdc3e1 Cleanup unit handling in the stackup drawing tool 2021-10-08 22:30:20 +01:00
Roberto Fernandez Bautista 677166f0b8 CADSTAR PCB: Rule Areas have zero width
Cadstar areas have a line width but this is only for display purposes.
Instead CADSTAR uses the center line when determining whether a DRC
violation occurred.
2021-10-08 21:27:32 +01:00
Roberto Fernandez Bautista 2dfbd42be6 CADSTAR PCB: Legacy netclass and design settings loading is required 2021-10-08 20:48:10 +01:00
Roberto Fernandez Bautista ae0229b7c9 CADSTAR PCB: Add imported nets to the imported netclass. 2021-10-08 20:25:09 +01:00
Roberto Fernandez Bautista 58fc4f512d CADSTAR PCB: Don't create zero width tracks
Fixes a bug in the route offsetting part of the import
that was resulting in zero-width tracks being imported.
2021-10-08 20:25:09 +01:00
Roberto Fernandez Bautista 16b61e47cd CADSTAR PCB: Clear arcs from polys before boolean ops (e.g. zone fills) 2021-10-08 20:25:09 +01:00
Roberto Fernandez Bautista fb588da875 CADSTAR PCB: Fix loading of thermal relief gap in zones
We were loading as solid fill when the relief gap was exactly the
same as the minimum width.

Also we can do better than just load as solid fill when it is smaller:
we can instead just use the minimum width and at least it still will
have thermal reliefs.
2021-10-08 17:39:08 +01:00
jean-pierre charras 4d6b1a4e36 pns_diff_pair_placer: fix empty message when a signal of a pair is not found.
Fixes #9334
https://gitlab.com/kicad/code/kicad/issues/9334
2021-10-08 14:57:01 +02:00
Roberto Fernandez Bautista cb47bf25c0 CADSTAR PCB: Actually load the original route code as a KiCad NETCLASS
We weren't actually loading it into the design settings even though
everything else was already being correctly loaded.
2021-10-07 22:13:06 +01:00
Seth Hillbrand f9c83dbc44 Fix footprint type memory
The flags don't map quite right, so we keep the memory of the drop-down
and translate to flags.  This protects against flag values changing
2021-10-07 11:29:51 -07:00
Seth Hillbrand 51d3440c38 Use footprint type to inform new pad type
Makes usage cleaner.  If the user specifies that they are creating an
SMD, they should get SMD pads by default so that they don't have to
change them later.

Fixes https://gitlab.com/kicad/code/kicad/issues/9333
2021-10-07 11:10:26 -07:00
Jeff Young 57c7d663b0 Fix bone-headed mistake when moving panel disabling. 2021-10-07 00:17:42 +01:00
Seth Hillbrand ad85f8078a Reverse escaping when transferring multi-line
We escape the strings coming out of the DIALOG_TEXT_PROPERTIES window,
so we need to unescape the ones coming in

Fixes https://gitlab.com/kicad/code/kicad/issues/9327
2021-10-06 13:25:03 -07:00
Seth Hillbrand a8ec3b58ed Use via's real drill value for hole size
If the via drill is "Default" be sure to get the default value rather
than the placeholder

Fixes https://gitlab.com/kicad/code/kicad/issues/9313
2021-10-06 11:00:58 -07:00
Jeff Young 1bb5fc3fd6 Work around EnsureVisible bug in wxWidgets during DRC cross-probe.
Also adds double-click-marker to open DRC dialog and select marker
in list.

Fixes https://gitlab.com/kicad/code/kicad/issues/7246
2021-10-06 11:17:03 +01:00
Jeff Young 95f841a037 A more nuanced method of making Board & Schematic Setup read-only.
This one still allows you to scroll to see all contents.

Fixes https://gitlab.com/kicad/code/kicad/issues/9302
2021-10-06 11:16:46 +01: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
Seth Hillbrand 548e5f49bd Clean up unused variable usage
Unused variables in function calls can be commented out.  Unused
return variables get a new routine `ignore_unused()` that silences the
warnings with zero overhead.
2021-10-05 10:00:30 -07:00
Jeff Young 92008a089a Disable Board & Schematic Setup controls when project is locked.
(or missing).

Fixes https://gitlab.com/kicad/code/kicad/issues/9302
2021-10-04 16:47:27 +01:00
Jeff Young ffd6fde700 Improve consistency and hotkey access in Appearances.
Added hotkey for cycling through net & netclass color modes.
Added hotkey for cycling through ratsnest layer visibilities.
Added code to display hotkey (if set) on the above and on high-contrast
cycle.

Fixes https://gitlab.com/kicad/code/kicad/issues/9312
2021-10-04 13:44:43 +01:00
Jeff Young 930c4e5582 Cleanup.
Formatting.
Naming conventions.
Use of auto.
Use of STL cover types.
2021-10-03 19:42:29 +01:00
Jeff Young 11c91c7179 Improve obscuring dialog algorithm to handle multiple dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/8970
2021-10-03 13:27:46 +01:00
Jeff Young 5c402a64ab Use mathematical rotation direction in Move Exactly dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/1897
2021-10-03 00:11:01 +01:00
Jeff Young 574bef2237 Normalize drawing sheet path to env vars & prj, not just prj.
Also cleans up the dialog a bit.

Also changes the workings of NormalizePath to return the input if
it couldn't be shortened which saves open coding that behaviour in
all its callers.

Fixes https://gitlab.com/kicad/code/kicad/issues/9036
2021-10-02 23:39:45 +01:00
Jeff Young e2baacec21 Add cross-probing between PCB (markers) and DRC marker list.
Fixes https://gitlab.com/kicad/code/kicad/issues/7246
2021-10-02 23:39:45 +01:00
jean-pierre charras da79a3dd69 Option graphics limited to 45deg in creation: separate options for brd and fp editors.
Add these options in PANEL_EDIT_OPTIONS.
This option was previously living only in some context menus, not really visible.
2021-10-02 16:43:31 +02:00
Jeff Young 10dd70881c New paramaterized interface doesn't like quoted parameters.
(At least on MSW, anyway.)
2021-10-02 14:08:36 +01: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
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
jean-pierre charras a738257c43 Remove a tool tip not related to the parent widget. 2021-09-30 20:17:45 +02:00
Seth Hillbrand e7ae3a181f Handle casing for FocusOnItem
Some items are complex (footprints) and some don't have logical polygons
(PCB_MARKER), so we can't transform everything.  So, handle the items we
can transform normally and use bbox or boundinghull for everything else
2021-09-29 16:19:49 -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 ee2789943f Supply grid with a GRID_TRICKS.
Fixes https://gitlab.com/kicad/code/kicad/issues/9273
2021-09-29 18:44:19 +01:00
Jeff Young 0438a45176 Don't allow reentrancy into PlaceFootprint.
Fixes https://gitlab.com/kicad/code/kicad/issues/9269
2021-09-29 17:01:33 +01:00
Jeff Young 3b6da14614 Don't allow offset for circular pads.
Fixes https://gitlab.com/kicad/code/kicad/issues/9266
2021-09-29 15:27:34 +01:00
Jon Evans 07e01e6297 Allow converting graphic arc to track arc 2021-09-28 21:00:15 -04:00
Roberto Fernandez Bautista 2e120528c8 Length Tuner: Allow single meander when it fits on its own 2021-09-28 18:50:31 +01:00
Roberto Fernandez Bautista 71156368c9 Length Tuner: Allow controlling the side of the meander using the cursor
Also fixes an issue that did not allow single meanders to be placed
2021-09-28 18:50:31 +01:00
Jeff Young f73042fe24 Some minor performance enhancements. 2021-09-28 14:28:35 +01:00
Jeff Young fac48ddafb Don't include stale nets in net counts.
Fixes bug reported by Franck.
2021-09-28 14:28:12 +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
Mike Williams 726f9ebe3d Pcbnew: Router tool should not block drag selection when idle
The other drawing tools allow drag selection while idle. Also, it makes
it more obvious to the user when accidentally drag selecting while
routing than just doing nothing on a drag with the routing tool selected
and idle.
2021-09-27 16:05:13 +00:00
Jeff Young 544fa939f8 Lock/unlock group members when locking/unlocking group.
Also moves the stateful selection filter to after the hierarchy filter
since the hierarchy filter might swap a pad selection for a footprint
selection.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/7542
2021-09-27 11:29:52 +01:00
Jeff Young dfe4997664 Fix nullptr crash.
Fixes https://gitlab.com/kicad/code/kicad/issues/9250
2021-09-27 10:27:25 +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
Jon Evans e2368b733c Allow selection of NPTH pads with zero copper size
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9249
2021-09-26 18:17:50 -04:00
Jeff Young 422def1261 Move cross-probe scrolling to FocusOnLocation.
It handles not moving the display too much and using the exposed
center if there is a dialog over the window.

Fixes https://gitlab.com/kicad/code/kicad/issues/8985
2021-09-26 20:06:50 +01:00
Jeff Young a3dcdd4887 Allow highlight-net to work on zone copper.
We were already checking zones separately (after tracks and pads); we
just weren't setting the flag that causes the COLLECTOR to also test
zone fills.

Fixes https://gitlab.com/kicad/code/kicad/issues/5924
2021-09-26 19:26:22 +01:00
jean-pierre charras 5853f0890e Gerber job file: fix a bug that prevent writing dielectric constants for impedance controlled boards. 2021-09-26 16:11:15 +02:00
Jeff Young b799d563e5 Slight improvement to track & via clearance option text.
Fixes https://gitlab.com/kicad/code/kicad/issues/8838

Fixes https://gitlab.com/kicad/code/kicad/issues/8839
2021-09-26 11:02:57 +01:00
jean-pierre charras 77f47b6e47 Avoid assertion in some cases. 2021-09-26 10:54:50 +02:00
jean-pierre charras 9f64850325 Drawing stackup table: fix a few issues and missing items.
Fixes #9243
https://gitlab.com/kicad/code/kicad/issues/9243
Fixes #9244
https://gitlab.com/kicad/code/kicad/issues/9244
2021-09-26 10:31:41 +02:00
Jeff Young 6b25099df7 Read/write lock status for fp text.
Fixes https://gitlab.com/kicad/code/kicad/issues/9325
2021-09-25 20:37:56 +01:00
Seth Hillbrand 3e7310a219 Move FP type check to FP DRC
Checks for validity are better centrally located where they don't
interrupt user actions
2021-09-25 08:56:27 -07:00
Jeff Young 46949abe4a Don't scroll to highlight an object already visible. 2021-09-25 15:31:52 +01:00
Seth Hillbrand c3b6939ea7 Allow quiet creation (scripting) 2021-09-24 13:49:45 -07:00
Seth Hillbrand bb95ca2966 Make MW footprints proper attrib 2021-09-24 13:48:01 -07:00
Seth Hillbrand 64be61b4d6 Allow user to set footprint type up front
The default is usually wrong and presenting the basic footprint
information when creating an empty footprint allows the user to
establish their preference before mistakes occur.

Fixes https://gitlab.com/kicad/code/kicad/issues/9215
2021-09-24 13:48:01 -07:00
Seth Hillbrand a6fc885402 Component->Footprint label 2021-09-24 13:48:01 -07:00
Seth Hillbrand 963a8ee42d Warn users when creating footprints about mismatch
Checks to see if the footprint attribute matches the type of pads
contained in the footprint.  Can prevent issues during fabrication if
users forget to adjust them during creation.

Fixes https://gitlab.com/kicad/code/kicad/issues/9215
2021-09-24 13:48:01 -07:00
Mike Williams 1b0c274e22 Python: Copy board iterables to prevent segfaults
Python code like:
for track in board.GetTracks():
  board.Remove(track)

Would delete tracks in the the underlying m_tracks while iterating over
it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5192
2021-09-24 19:40:46 +00:00
Jeff Young bf145dd633 Confine allow-locked-pad-selection-even-when-filtered to single-select.
Also make sure text in a locked footprint is not selected if the locked
items filter is unset.

Fixes https://gitlab.com/kicad/code/kicad/issues/9227
2021-09-24 18:58:22 +01:00
Jeff Young c38de1dcaf Pull back some 7.0 fixes to Custom Rules code completion. 2021-09-23 13:08:31 +01:00
Jon Evans a2ad204f4b Fix off-by-one in AssembleTuningPath
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9003
2021-09-22 20:25:22 -04:00
Seth Hillbrand 5975524826 Fixup PCB_ONE_LAYER_SELECTOR
It is useful to be able to tell which layer you are selecting.  The
checkboxes, on the other hand, provide no information when dealing with
a single layer selection
2021-09-22 15:57:27 -07:00
Seth Hillbrand 140e4cbe28 Avoid assertion on 2-layer board
New boards may have INVALID_LAYER inbetween F_Cu and B_Cu in the
stackup.  Skip these and any layer values beyond what we store currently
2021-09-22 12:37:17 -07:00
Seth Hillbrand 84864351c7 Fix units naming in stackup
We were not handling the new mils/inches division in stackup table

Fixes https://gitlab.com/kicad/code/kicad/issues/9210
2021-09-22 12:30:02 -07:00
Mike Williams 16ec6fbec4 Plugins: Fix QR code generator shape exception
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9079
2021-09-22 11:15:26 -04:00
Seth Hillbrand be799b49a8 Fix equality in dp matching
A single count is found when dp ends with matching char.  .Right(0) will
return an empty wxString() which is still valid

Fixes https://gitlab.com/kicad/code/kicad/issues/9206
2021-09-21 19:47:15 -07:00
Jon Evans cf53b053a1 Improve handling of dragging around locked segments
Locked segments now are not modified if they weren't the start item.
If a locked segment is the start item, it is automatically unlocked.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9145
2021-09-21 22:38:53 -04: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
Mike Williams 65c9170b46 Pcbnew: Clear tool and selection before updating PCB from schematic
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9196
2021-09-21 00:06:56 +00:00
Seth Hillbrand 22a29a42cf Generalize net DP matching
The requirement of 1-2 numbers following P/N or +/- was arbitrary and
not needed.  We also add the _ to allowable suffixes to permit DP
matching of auto-renamed nets
2021-09-20 15:30:47 -07:00
Jeff Young 32a5653464 Remove yet more single-pad-net stuff.
Fixes https://gitlab.com/kicad/code/kicad/issues/9179
2021-09-20 22:04:02 +01:00
Jeff Young 04aff93248 Eagle doesn't use netclass clearance so make them the board clearance.
Fixes https://gitlab.com/kicad/code/kicad/issues/2442
2021-09-20 21:31:19 +01:00
Roberto Fernandez Bautista dc1fd3d9ba PNS test app: Add logging information for curved track routing 2021-09-20 20:35:24 +01:00
Jeff Young f66654247a Read netclasses when importing Eagle projects.
Also creates a DRU file with the various netclass-to-netclass
clearance rules from the Eagle clearance matrix.

Fixes https://gitlab.com/kicad/code/kicad/issues/1774
2021-09-20 12:38:56 +01:00
jean-pierre charras 8848f7158d Fix a Coverity warning (non tested pointers, really a bug) 2021-09-20 09:14:10 +02:00
Jeff Young 40a0f25a3e Formatting. 2021-09-19 19:30:09 +01:00
Jeff Young 6ea7e59991 Fix "done" message being in wrong place for drill files.
Fixes https://gitlab.com/kicad/code/kicad/issues/9172
2021-09-19 19:26:10 +01:00
Jeff Young 3651d7c5e7 Remove vestiges of old zoom-auto architecture.
Fixes https://gitlab.com/kicad/code/kicad/issues/9055
2021-09-19 18:32:15 +01:00