Commit Graph

417 Commits

Author SHA1 Message Date
Jeff Young dae40d5c9f Don't use std::set_difference which assumes sorted lists.
Fixes https://gitlab.com/kicad/code/kicad/issues/4968
2020-08-01 22:15:53 +01:00
Ian McInerney da6d0c9de6 Add cancel to the selection context menu if a tool is running
The selection tool's context menu is displayed during the move tool,
so it should contain the ability to cancel the current action.
2020-07-16 15:12:58 +01:00
Seth Hillbrand 7cea4b23f1 ADDED: Expand selection in context menu
Break out the context menu with heuristically limited choices being
appended to the main list rather than re-selecting

Fixes https://gitlab.com/kicad/code/kicad/issues/4799
2020-07-07 14:18:35 -07:00
jean-pierre charras 1463dd10b2 Pcbnew fix: Select/Expand Connection can be used only once on the same segment
Was due to a incorrect cleared flag in calculations.

Fixes #4767
https://gitlab.com/kicad/code/kicad/issues/4767
2020-07-05 12:42:12 +02:00
Jon Evans 65f5ebd8f2 ADDED: Persistent selection filter UI for PcbNew 2020-06-28 15:12:47 +00:00
Jon Evans 0d4ee39f75 CHANGED: Copper zones can be on more than one layer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1963
2020-06-28 08:52:37 -04:00
Jeff Young 32c3ea4edd Flags cleanup.
Remove extraneous use of FLAG0 from tracks cleaner (it was checked but
never set).

Fix issue in expand connections where two parts of it couldn't agree
on the same flag (BUSY vs SKIP_STRUCT), and where the second part was
clearing the flag instead of setting it.

Remove obsolete HIGHLIGHT infrastructure (we now use selection).

Remove extraneous use of BUSY flag in several places (it was never
set).
2020-06-27 17:53:04 +01:00
Jeff Young da2b7071b4 WYSISYG custom pad editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/2153

Fixes https://gitlab.com/kicad/code/kicad/issues/2305
2020-06-27 14:37:01 +01:00
Jon Evans 129c16cf7d Fix unselected event not firing when clicking empty space 2020-06-26 22:00:12 -04:00
Jon Evans c0175c48af ADDED: Setting to control track mouse drag behavior
Default is now to perform a 45-degree drag
2020-06-21 15:39:39 -04:00
Seth Hillbrand 491ac0256d pcbnew: Add a number of missing handles for module zones 2020-06-14 07:23:10 -07:00
Jon Evans 5250215d97 Use the calculated bbox for zoomFitSelection
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4120
2020-05-29 16:38:25 -04:00
Mikołaj Wielgus ecec7192fc Add "Select All" in schematic & layout disambiguation popup menu
ADDED: "Select All" in schematic editor disambiguation menu
ADDED: "Select All" in layout edtor disambiguation menu

Fixes https://gitlab.com/kicad/code/kicad/-/issues/3877
2020-05-24 23:35:04 +00:00
Michael Kavanagh 8418ac34bc Allow fp text to be group selected in HC mode
Fixes https://gitlab.com/kicad/code/kicad/issues/2259
2020-05-07 21:57:37 +00:00
Simon Richter 5aac36dba9 New enum for trace selection mode
This avoids giving KICAD_T another meaning, which is especially messy here
as "select up to the next via" is encoded as SCH_JUNCTION_T, which belongs
to eeschema.

Also, document what is happening.
2020-04-15 11:17:51 +00:00
Jeff Young e016b629d3 Be smarter about determining if there are modules in the selection list.
The old algorithm would delete modules if another module was in the
list, which was not the intention.

Fixes https://gitlab.com/kicad/code/kicad/issues/4175
2020-04-09 00:06:17 +01:00
jean-pierre charras 25fb2595c8 Fix fully broken selection of items of the same sheet, in pcbnew and from eeschema.
Previously, the full UUID path used to select footprints was full broken.
2020-04-02 14:21:09 +02:00
Seth Hillbrand 12088f240d Fix a couple crashes with small canvases
The canvas size is not guaranteed to be strictly > 0, so we need to
enforce a minimum returned size before dividing by it or passing to GAL
initialization
2020-03-04 14:33:42 -06:00
Jeff Young 85c2e0d23a Add user-defined severities, exclusions and colors to DRC markers.
Exclusions are currently persisted in the project file.

Fixes https://gitlab.com/kicad/code/kicad/issues/1989
2020-03-04 00:39:28 +00:00
Jeff Young cdad62022b Bug fix for double-click in DRC dialog.
Also better clean-up of highlighting in board editor window.
2020-02-25 12:18:24 +00:00
Seth Hillbrand 8c19b4b6ae pcbnew: Adding arcs to PNS
This is allows ARCs in tracks to be synchronized with
the PNS router.  Note this does not yet include the UI components
to route curved traces
2020-02-21 16:11:41 -08:00
Jeff Young ea025a35e5 Change KUUID to KIID. 2020-02-21 22:20:42 +00:00
Jon Evans e8e3b4f11e Rename UUID to KUUID to fix MSVC build
Also add another newly-required boost flag
2020-02-20 22:07:17 -05:00
Jeff Young 129042f8a6 Convert timestamps to UUIDs. 2020-02-20 21:29:52 +00:00
Ian McInerney b1240b5b1e Gracefully shutdown tools when frames are closed
If the tools are not gracefully exited, then the stack variables are
never destroyed, so variable lifetime issues can occur.

Fixes https://gitlab.com/kicad/code/kicad/issues/1753
2020-02-05 22:23:24 +00:00
Seth Hillbrand e94f356ad5 pcbnew: Correct stop condition for expand
Typo in selection tool caused expansion past vias.
2020-02-05 14:14:50 -06:00
Jeff Young f1b1c91961 Be a little more friendly towards SMD footprints.
Increase the coverage ratio a bit so that footprints that still
have 10% of their area available for selection won't bring up the
disambiguation menu.

Fixes https://gitlab.com/kicad/code/kicad/issues/3721
2020-02-03 19:35:48 +00:00
Jeff Young d02c0da3ab Remove preferred layer disambiguation for multiple modules.
The preferred list isn't actually in use anymore at this point, so
it currently has no effect other than to mess things up since we
aren't keeping track of which modules have been rejected when we
check the module count.

Fixes https://gitlab.com/kicad/code/kicad/issues/3721
2020-02-03 19:35:48 +00:00
Jeff Young 89dfee9ebe Employ an accuracy when hittesting (particularly for lines).
Also fixes a bug where the parent module was being hit-tested
for its children.

Fixes https://gitlab.com/kicad/code/kicad/issues/3750
2020-02-03 15:08:01 +00:00
Jeff Young 8d0f31f6f4 Clean a bunch of legacy code out of the Filter Selection dialog. 2020-01-12 20:53:56 +00:00
Jeff Young 127c66285b Rename old DIALOG_BLOCK_OPTIONS to DIALOG_FILTER_SELECTION....
... which is what it has done for some time now.
2020-01-12 20:30:58 +00:00
Jeff Young e03281a9ae Allow exclusive-or selections on OSX. 2020-01-10 22:32:49 +00:00
Mark Roszko 19ceb11ae7 Change more enums over to scoped enums 2019-12-28 00:55:11 +00:00
jean-pierre charras 6bc8005d60 Pcbnew: fix strange behavior when editing board setup, if a zone is currently selected.
The zone was silently deleted.

Fixes #3673 | https://gitlab.com/kicad/code/kicad/issues/3673
2019-12-16 12:44:53 +01:00
jean-pierre charras c34dfc4230 fix a minor compil warning 2019-11-23 18:36:40 +01:00
Jeff Young 13df645af9 Fold down select/expand connection/copper to a single action.
Fixes: lp:1832902
* https://bugs.launchpad.net/kicad/+bug/1832902
2019-11-22 19:30:36 +00:00
Jeff Young 523de87b45 Re-implement copper selection algorithms.
Fixes: lp:1832902
* https://bugs.launchpad.net/kicad/+bug/1832902
2019-11-22 19:30:36 +00:00
Jeff Young 490bc2874f Clean up board commit a bit.
This change makes it so that we don't run the event loop inside
the commit.  It's not clear this is an issue, but it seems safer
not to.

Fixes: lp:1852589
* https://bugs.launchpad.net/kicad/+bug/1852589
2019-11-16 22:32:52 +00:00
Seth Hillbrand 6625d0721e Implement Get/Set display options
The pointer passing for display options is deprecated.  This removes the
excess casting as the EDA_FRAME didn't need the base call with no value.
All requests for display options are now returned const and are updated
with a Set() routine after modification.

In Gerbview, this resolves an issue where the display options were not
stored because it was receiving the NULL from EDA_FRAME.
2019-11-07 08:26:44 -08:00
Seth Hillbrand 19c643b29a pcbnew: Prevent extra selection
We want to avoid selecting items that are disabled in the item list.
Our standard method is in the GetViewLOD() that performs both size and
visibility.  This extends the check to module text and via.

Fixes: lp:1851133
* https://bugs.launchpad.net/kicad/+bug/1851133
2019-11-05 12:24:29 -08:00
Seth Hillbrand 868ff5bb2c Right click gets a new object if the mouse has moved
Right click is a pointing operation combined with a request for the
context menu.  We need to highlight the user's intended object when they
have moved their mouse to a new element instead of showing the context
menu for the selected object.

However, in cases where the selection is difficult to make, it is
sometimes helpful to select the item first, then right-click.  In these
cases, we keep the selection where the mouse remains inside the selected
object's bounding box.
2019-10-29 16:11:06 -07:00
Ross Schlaikjer 64a42ffa35 Add keepout in footprints: Starting point. 2019-10-29 11:24:30 +01:00
Jeff Young 4bf2b6a9f7 Performance enhancements for cross-probing.
While found when profiling cross-probing, many of these will also
improve other things.
2019-09-27 19:58:16 +01:00
Jeff Young 44a1cf9f1b Implement quiet-mode for selection clearing.
Also adds comments for exising quiet-mode calls.

Fixes: lp:1843177
* https://bugs.launchpad.net/kicad/+bug/1843177
2019-09-08 19:45:35 +01:00
Jeff Young 10c25a2290 Update frame type enum to match current class names. 2019-09-06 23:38:20 +01:00
Jeff Young 1bfefc61ea Allow mouse drag to initiate a router drag if over a track or via.
Fixes: lp:1840694
* https://bugs.launchpad.net/kicad/+bug/1840694
2019-08-19 21:09:44 +01:00
Jeff Young 045f5f6a61 Move some functions out of SELECTION_TOOL that don't really belong there. 2019-08-13 13:29:18 +01:00
Jeff Young dd938b02df New move tool doesn't require GetAndPlace to jump through hoops.
And at least one of those hoops leaves the cursor forced.

Fixes: lp:1839877
* https://bugs.launchpad.net/kicad/+bug/1839877
2019-08-13 10:01:47 +01:00
Jeff Young f3f0a6899f Invoke move by ACTION; the EDIT_TOOL does lots of other stuff too.
Fixes: lp:1839877
* https://bugs.launchpad.net/kicad/+bug/1839877
2019-08-12 22:21:09 +01:00
Jeff Young c836cc9cf8 Don't use activate to move as the edit tool must activate for other ops.
Fixes: lp:1839534
* https://bugs.launchpad.net/kicad/+bug/1839534
2019-08-10 11:58:05 +01:00