Commit Graph

94 Commits

Author SHA1 Message Date
Jeff Young a35ae8cdce Don't re-fetch selection when running select-in-same-sheet.
Fixes https://gitlab.com/kicad/code/kicad/issues/11110
2022-03-28 21:54:24 +01:00
Mike Williams e51ab86225 Schematic Drag: fixes and improvements
Fixes:
* Various special cases around junctions on pins and dragging.

* Some rotations of endpoints resulting in a 45 degree rotate.

* Some cases where it was possible to get a line with neither
  endpoint selected, and also substractive unselecting only one of two
  selected endpoints unselecting both.

* Use line midpoint for sorting.  Start and endpoints aren't
  consistent in the order they appear on the X or Y axis. So,
  we need to use the midpoint for our position for consistent
  sorting when dragging groups of parallel lines where some
  have the start and end reversed.

Other:
* Rename TEMP_SELECTED TO SELECTED_BY_DRAG. This is the actual meaning
  of the flag, and should reduce confusion as
  to when it should be used.

* Move usage of TEMP_SELECTED as an algorithmic mark to CANDIDATE
  instead.

* Fix mistaken clearing of START_POINT and ENDPOINT.

* Move endpoint setting and clearing out of narrowSelection, and into
  selectPoint and selectMultiple.

* Don't show dangling end warnings on new lines
2022-03-28 16:02:48 -04:00
Wayne Stambaugh 7da7864f5e Fix some Coverity issues. 2022-03-25 15:51:05 -04:00
Wayne Stambaugh 7b2d9dfc0c Fix some Coverity uninitialized scalar variable issues. 2022-03-24 13:17:07 -04:00
Jeff Young 06c1bccccd Exclude hidden text from selection in FP Editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/11111
2022-03-12 23:29:01 +00:00
Fabien Corona d452f79860 pcbnew: search for nets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10601
2022-03-10 23:12:30 +00:00
Seth Hillbrand b5c2f0d39a Remove the open array in favor of std containers
The containers allow iteration, size knowledge and lower bug surface
2022-03-03 16:03:26 -08:00
Seth Hillbrand 535ea800c0 Honor modifier keys in diambiguation
Needs to be reset for the new action before selecting elements at a
point.

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

(cherry picked from commit a30ad0b54a)
2022-02-25 16:16:15 -08:00
Jeff Young 5c54f40eae Layer visibilities aren't stored in project for footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/10953
2022-02-25 00:08:49 +00:00
Jeff Young 5efa354f0f Add asserts to flush out incorrect uses of GetLayer(). 2022-02-18 12:14:38 +00:00
Seth Hillbrand 51d7b49067 Don't halt expansion on zero-length
We avoid counting endpoints for tracks that have no length
2022-02-07 13:53:42 -08:00
Jeff Young 34a9a165c9 More wide-string declarations. 2022-02-05 22:26:31 +00:00
Jeff Young 5739505aa3 TextBoxes for PCBNew. 2022-01-31 20:00:47 +00:00
Alex e9ffea83fd Cross-probing: Do not center/zoom on empty BBox 2022-01-31 10:17:59 +03:00
dsa-t bc1ff6756f Cross-probing/selection for multiple items (SCH->PCB) 2022-01-16 20:29:03 +00:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Jeff Young fa908e1f98 Dimensions for footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/8441
2021-12-24 21:10:28 +00:00
Jeff Young 4b6bf3095a Radial dimensions.
ADDED radial type dimensions.

Fixes https://gitlab.com/kicad/code/kicad/issues/2056
2021-12-23 19:34:54 +00:00
Jeff Young d9dba2edb2 Tidy up pad & parent footprint selection corner cases.
Fixes https://gitlab.com/kicad/code/kicad/issues/9923
2021-12-23 16:54:03 +00:00
Jeff Young 4c565fd222 Top layers includes a whole bunch of layers...
... and the first isn't particularly meaningful.  Use GetActiveLayer
instead.

Fixes https://gitlab.com/kicad/code/kicad/issues/9972
2021-12-13 18:23:18 +00:00
Jeff Young e9847cf2bd Exclude vias from first 'U' step.
Fixes https://gitlab.com/kicad/code/kicad/issues/9902
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
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
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
Wayne Stambaugh 53f5d616aa Coverity issue fixes. 2021-11-13 11:38:31 -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 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 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
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 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 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
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
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 9271ac1a4f Don't allow deletion of pads when not in allow-free-pads mode.
Fixes https://gitlab.com/kicad/code/kicad/issues/8884
2021-07-29 16:03:25 +01:00
Wayne Stambaugh cf00319c85 More NULL expunging. 2021-07-20 07:27:18 -04:00
Wayne Stambaugh 27e9750507 Pcbnew: fix footprint selection bug.
Do not remove footprint objects from list of selected objects when there
are no drawable objects other than the reference and value text.

Increase the minimum size rectangle for footprints from 0.025mm to 1mm
when the footprint has no drawing objects so that it is easier to select
the footprint in this case.

Add some pretty colors to the footprint bounding box and hull outline
so that it's possible to tell the difference between selection areas.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8379
2021-06-23 19:46:33 -04:00
Jeff Young 096e342386 Prefix TRACK, ARC and VIA. 2021-06-11 22:07:02 +01:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Marek Roszko 10e60acf34 Clean up including of board_design_settings.h 2021-06-06 15:03:42 -04:00
Ian McInerney 23f8851409 Remove pcb_group include from board header 2021-06-03 20:03:31 +01:00
Marek Roszko 4df3cb912d Remove another leaky wx/log.h header 2021-06-03 08:11:15 -04:00
Jeff Young 0598c82972 Terminology (use present tense for flags). 2021-05-31 12:26:44 +01:00