Commit Graph

2349 Commits

Author SHA1 Message Date
Jeff Young df1e74d418 Clean up dead code from last commit. 2021-12-08 23:16:33 +00:00
Jeff Young 7ffd43a6f4 Regularize the promotion of pads to footprints in non-free-pad mode.
Also regularizes some of the other selection filtering options.

This also fixes an invalidated iterator (and subsequent segfault) in
the old code.

Fixes https://gitlab.com/kicad/code/kicad/issues/9896
2021-12-08 13:08:54 +00:00
dsa-t 9c619d8f4e Allow some navigation tools when selecting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9565
2021-12-07 23:00:39 +00:00
dsa-t a7193e0932 Do not warp cursor to last location when footprint/text placement is activated from toolbar/menu.
Also makes the footprint appear instantly after closing the dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9840
2021-12-07 22:48:56 +00:00
Jeff Young 73b39e836d Set modify bit when editing page layout.
Fixes https://gitlab.com/kicad/code/kicad/issues/9891
2021-12-06 23:08:33 +00:00
Jeff Young 2446844cd3 Fix bugs in free-pad logic.
Don't promote pads to parent footprint selection when NOT in free
pad mode during move.

Implement move algorithm in rotate.

Fixes https://gitlab.com/kicad/code/kicad/issues/9893
2021-12-06 22:53:45 +00:00
Jonathan Haas 04b0435c45 Snap to pads when placing via
Fixes https://gitlab.com/kicad/code/kicad/issues/9873
2021-12-06 15:54:49 +00:00
Roberto Fernandez Bautista 34a0d1947a pcbnew Flip: Filter selection for free pads, select footprint instead
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9875
2021-12-06 14:34:26 +00:00
Seth Hillbrand 4b226b8172 Unify our breakTracks routines
Fixes https://gitlab.com/kicad/code/kicad/issues/9793
2021-11-27 06:34:47 -08:00
Jeff Young ba6ae4fa9b Kicad has many plugins. This one is for the pcb. 2021-11-25 12:56:46 +00:00
Seth Hillbrand f97c7c78c8 Connect ruler tool with axes preferences
Adds "UpdatePreferences" action that is called when the preferences are
updated, allowing running tools to act on changes that may affect them

Fixes https://gitlab.com/kicad/code/kicad/issues/9737
2021-11-23 12:52:21 -08:00
Jeff Young 8777ce3d4e TEMP_SELECTED is in m_flags, not m_status.
Fixes https://gitlab.com/kicad/code/kicad/issues/9610
2021-11-21 23:52:45 +00:00
Jeff Young cf1d5f5724 Teach selectConnectedTracks() about layers.
Fixes https://gitlab.com/kicad/code/kicad/issues/9610
2021-11-21 13:53:43 +00:00
Jeff Young 229706b48a Formatting. 2021-11-21 13:53:43 +00:00
Seth Hillbrand 1d2fd6d271 Change persistent 45° state to only drawing
Move/edit points have a lossy state that holds only for the time in
which the tool is active.  It reverts back to non-constrained after
completion of the move/point edit

Fixes https://gitlab.com/kicad/code/kicad/issues/9574
2021-11-17 15:38:28 -08:00
Wayne Stambaugh 53f5d616aa Coverity issue fixes. 2021-11-13 11:38:31 -05:00
Jeff Young 381da21609 Don't inc/dec to netclass track width value.
Fixes https://gitlab.com/kicad/code/kicad/issues/9622
2021-11-12 17:50:34 +00:00
Jeff Young 0631c8fc74 Fix logic bug when updating circular pad points.
Fixes https://gitlab.com/kicad/code/kicad/issues/9576
2021-11-09 13:14:24 +00:00
Jon Evans 75d75799f7 Move to getters/setters for aux and grid origin
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8836
2021-11-08 22:36:40 -05:00
Jeff Young d0014a307d Reduce the artificial gravity for selecting vias by a bit.
Fixes https://gitlab.com/kicad/code/kicad/issues/9563
2021-11-08 20:53:59 +00:00
Jeff Young 3c78bf4ef8 One active point at a time. 2021-11-01 16:17:33 +00:00
Jeff Young e3ef101ec9 Add missing view controls for FP Editor Appearance Manager. 2021-10-31 16:33:03 +00:00
Electro707 4afb59fda0 Added feature to switch between router modes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9414
2021-10-28 22:46:05 +00:00
jean-pierre charras 1dbe8442b1 fp editor: fix crash (null pointer) when trying to drag an item.
(there is no roter tool in fp editor)
Fixes #9476
https://gitlab.com/kicad/code/kicad/issues/9476
2021-10-28 11:51:04 +02:00
Roberto Fernandez Bautista a79a221257 Array creator tool: Add option to assign unique reference designators
ADDED: Option to assign unique reference designators to footprints
created with the array tool [pcbnew]

CHANGED: Array creator dialog no longer displays pad numbering properties
when in the board editor. [pcbnew]

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2354
2021-10-25 22:38:49 +01:00
Seth Hillbrand ea4e06124e Edit library footprint command
Provides missing PCB_ACTION for the edit library footprint command.  This is
needed for python control of the command

Fixes https://gitlab.com/kicad/code/kicad/issues/9454
2021-10-25 09:25:37 -07:00
Seth Hillbrand 8a3bc3fe4d Don't translate empty strings
The _( "" ) msgid is reserved in gettext, so we need to avoid it in code
2021-10-25 06:24:06 -07:00
Jeff Young c9d858eaf5 Add status bar message for constraint mode.
Fixes https://gitlab.com/kicad/code/kicad/issues/9282
2021-10-24 14:04:12 +01:00
Jon Evans 3b18dce911 Remove vestigal setting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9444
2021-10-23 22:12:25 -04:00
Roberto Fernandez Bautista e950278637 Don't initiate a drag if the router is already active
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9277
2021-10-23 19:01:25 +01:00
Jeff Young e30d867439 Use consistent terminology for various constraint modes. 2021-10-23 12:18:08 +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
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
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
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
Jeff Young f9861b4a6c Finish arc rework and push out to file formats. 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 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 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
Ian McInerney 8d71bdc3e1 Cleanup unit handling in the stackup drawing tool 2021-10-08 22:30:20 +01: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 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
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 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 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 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
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 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
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 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 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 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 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
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
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 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
Marek Roszko 847c9e32c8 Don't allow the draw via tool to activate in the footprint editor
Fix #9186
2021-09-17 23:01:16 -04:00
Jeff Young b84d1456d5 KIFACE_I -> KIFACE_BASE. 2021-09-14 23:45:14 +01:00
Jeff Young 32e23d993e Formatting. 2021-09-13 17:18:58 +01: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
jean-pierre charras 3316f3998a Rename BuildPolyPointsList() to DupPolyPointsList() and optimize code
to avoid multiple useless copies of the list of polygon corners in code.
2021-09-11 14:21:36 +02: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
Jeff Young f0a26e4be0 Attempt to fix long-click issue (possibly just a typo).
Fixes https://gitlab.com/kicad/code/kicad/issues/9124
2021-09-09 12:20:30 +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
Michael Kavanagh 0e3c79d3b2 Remove inappropriate icons
Icons should be used sparingly to draw attention to the most used actions
2021-09-06 21:23:52 +00: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 343dbf0f5b Change default 45° hotkey to shift-space
This requires enabling the space key to be bound with shift, which was
disabled based on an overbroad limit of only allowing shift to be mapped
with letter keys
2021-09-06 12:18:29 -07:00
Seth Hillbrand 56ccaf6482 Constrain move tool when set
Move tool works slightly differently from other tools when figuring out
new locations.  This uses the global 45 enable flag to set proper item
locations when the user is requesting a 45° constraint on movement
2021-09-06 07:05:25 -07:00
Seth Hillbrand 86725db758 Ensure doInteractivePlacement enforces snap option
Fixes https://gitlab.com/kicad/code/kicad/issues/9105
2021-09-06 06:36:33 -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
Seth Hillbrand 092cdc0bb5 Move 45° limit to hotkey
This assigns the "Tab" key to a general pcbnew 45° limitation.  Limit
can be enabled/disabled using context menu as well.

Removed the user preference for 45° limitation on graphic lines as that
is overlapping with the general limitation, which is not an editing
preference so much as a temporary adjustment to tool action.

Related to https://gitlab.com/kicad/code/kicad/-/issues/8490
2021-09-05 13:42:51 -07:00
Seth Hillbrand e03257b55f Allow close placement of stitching vias
When placing a stitching via for a bypass capacitor, it is common to
place it close to the relevant pad.  If the via does not have the
correct net, this will violate DRC and be prevented.

Checking for zone-based net assignments allows the workflow to proceed
2021-09-01 15:52:35 -07:00
Seth Hillbrand 8a305eec32 Remove broken RefDesStringCompare
This function attempted a poor-man's natural compare but it assumed
specific structure of the string.  This broke for strings with
numberings that looked like decimals.

Instead, we use our natural string comparison function and remove the
references to this older function and its similar elements.

Fixes https://gitlab.com/kicad/code/kicad/issues/9067
2021-09-01 11:48:01 -07:00
jean-pierre charras 6c7c9ca50c Fix compil warnings (UNDO_REDO::GROUP renamed to UNDO_REDO::REGROUP to fix
collision name with a widows header on msys2)
2021-08-28 11:44:01 +02:00
Mike Williams 10247c268e Pcbnew: implement Find Next
Moves all of the find dialog control out of the selection tool similar
to the schematic editor. Dialog is also non-modal now to match the
schematic editor.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8966
2021-08-27 18:15:36 +00:00
Jeff Young e6ca9837a2 Clear numbers from non-numberable pads and don't run DRC on them.
This was also the last straw on the misnamed PAD::GetName() and
PAD::SetName(), which are now PAD::GetNumber() and PAD::SetNumber().

Fixes https://gitlab.com/kicad/code/kicad/issues/9017
2021-08-24 01:03:06 +01:00
Seth Hillbrand db5ce824af Use wildcard routine for extension matching
Move STEP export dialog wildcard to extension matching
2021-08-20 17:24:05 -07:00
jean-pierre charras 5574682d44 Fp editor: minor fixes:
- do not show the paste special context menu: it has no sense in this editor
- Paste command: fix incorrect rotation of pasted FP texts
2021-08-18 17:43:10 +02:00
jean-pierre charras 82849eda42 Fp editor: fix some crashes when trying to duplicate referece or value texts.
Fixes #8990
https://gitlab.com/kicad/code/kicad/issues/8990
2021-08-18 15:34:32 +02:00
Wayne Stambaugh 9ae9301b46 Fix shadowed variable. 2021-08-17 12:54:14 -04:00
Jeff Young 8b5f393804 DRC bug fixes and debugging improvements.
1) Don't wait for UpdateUserInterface to build the (global) list of
layer names.

2) Report clearance resolution between a silk layer and a mask layer.

3) When writing DRC reports, include info about the violating rule.

4) Report "no relevant layers" if we fail to find anything to write
a clearance resolution report about.

Fixes https://gitlab.com/kicad/code/kicad/issues/8963
2021-08-17 15:41:12 +01:00
Jeff Young 1ec70d30af Cherry-pick some 7.0 Clearance Resolution improvements.
6.0 will be in the field for a long time, and the better the debugging
tools we have available the less costly it will be to maintain.

Fixes https://gitlab.com/kicad/code/kicad/issues/8961
2021-08-15 19:03:58 +01:00
Jeff Young 41619ebbe2 Decouple PROGRESS_REPORTER interface from implementations. 2021-08-14 21:05:49 +01:00
Jon Evans 5bfafa5e4c Add rounding epsilon to convert tool polygon search
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8927
2021-08-12 20:17:04 -04:00