Commit Graph

152 Commits

Author SHA1 Message Date
Werni a7d5d1f091 Add more consts all over the place 2020-10-27 11:03:35 +00:00
Seth Hillbrand f8a4edb1c9 First pass renaming module to footprint
This is mostly in comments and the few remainin text strings that
reference module
2020-10-20 20:49:11 -07:00
Jon Evans 2abce40553 Better selection heuristics for highlight tool
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4011
2020-10-12 22:47:31 -04:00
Jeff Young ba0bed7a45 Groups don't go in the view, but they do go in an overlay when entered. 2020-09-25 22:51:16 +01:00
Jeff Young dba42ebed0 ADDED Properties Dialog for groups.
ADDED memberOf() function for DRC rule expressions.

Also fixes a bug in several of the pickers where the event wasn't
being correctly passed.

Fixes https://gitlab.com/kicad/code/kicad/issues/5647
2020-09-24 14:41:02 +01:00
Jon Evans 4a25db599e ADDED: Deselect net action
You can now deselect nets and netclasses (i.e. remove them from the
active selection) via the context menus in the appearance panel
2020-09-16 19:10:12 -04:00
Ian McInerney cb36006406 First round of cleanup for the PCB groups
ADDED: Leave group action

Fixes https://gitlab.com/kicad/code/kicad/issues/5299
2020-09-02 02:10:26 +01:00
Seth Hillbrand 1e315bc3fe pcbnew: Add "Select All" Action to pcbnew and fpedit
Fixes https://gitlab.com/kicad/code/kicad/issues/2497
2020-08-20 16:07:10 -07:00
Qbort b41892e4da Rename class GROUP in pcbnew to PCB_GROUP
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5156
2020-08-12 15:36:08 +01:00
Joshua Redstone ee428876ec ADDED: Group/Ungroup function
This implements the group/ungroup functions to mark a set of EDA_ITEMs as a unit, allowing them to be moved and rotated as a unit
2020-08-11 19:37:07 +00:00
Jon Evans 5d118b0700 More visibility settings infrastructure
ADDED: Three-state high contrast mode action
ADDED: Save contrast mode in local settings

Also some initial infrastructure for layer presets
2020-07-11 21:59:07 -04:00
Jon Evans a3655225cd Save selection filter state in project local settings 2020-07-06 21:53:12 -04:00
Jon Evans 65f5ebd8f2 ADDED: Persistent selection filter UI for PcbNew 2020-06-28 15:12:47 +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
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
Jeff Young 129042f8a6 Convert timestamps to UUIDs. 2020-02-20 21:29:52 +00:00
Seth Hillbrand 7c28c3838a Comment-only changes
Makes class comments conform to coding standards
2020-01-10 16:43:01 -08: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
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 a25368cc6b Improve spelling.
The groundwork here is thanks to kunda1.

Fixes: lp:1831510
* https://bugs.launchpad.net/kicad/+bug/1831510
2019-08-20 19:14:05 +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 987642eb8c Apply selectable logic to delete tool.
Fixes: lp:1838191
* https://bugs.launchpad.net/kicad/+bug/1838191
2019-07-28 12:31:18 -06:00
Jeff Young 7314acf053 Renaming. 2019-07-26 13:19:17 -06:00
Jeff Young 483dc24e87 Homogenize selection tools around our HIG.
In particular make addative and exclusive-or selections work the
same way.

Also give Highlight Net a hotkey now that it can't use ctrl-click
anymore.
2019-07-09 21:59:46 +01:00
Jeff Young 2f23aa9556 Implement a more robust tool stacking architecture.
We were running into various corner conditions where a tool's event
loop would exit while the tool was still active, or the tool would
get popped while we were still in the event loop.  (A lot of these
had to do with the POINT_EDITOR's, but not all of them.)

The new architecture:
1) tools always do a Push()/Pop()
2) everyone is responsible for their own pops; no more stack-clearing
on a cancel
3) CancelInteractive events go to all tools to facilitate (2)
2019-06-27 17:01:31 +01:00
Jeff Young 4eaba20cd3 Real-time highlighting for Pcbnew and ModEdit delete tools. 2019-06-25 21:10:21 +01:00
Jeff Young f9702aab87 Immediate actions for PlEditor, PcbNew, etc. 2019-06-25 11:34:28 +01:00
Seth Hillbrand 0571ff6ce2 pcbnew: Centralize selection clearing
Also adds check for items before getting BBox.

Fixes: lp:1832601
* https://bugs.launchpad.net/kicad/+bug/1832601
2019-06-12 09:06:23 -07:00
Jeff Young 765606012f Convert separate-compilation of selection.cpp to polymorphism. 2019-06-10 23:46:00 +01:00
Jeff Young 2d40425e4d Move footprint & symbol tree context menus to tool infrastructure.
Fixes: lp:1831692
* https://bugs.launchpad.net/kicad/+bug/1831692
2019-06-05 20:16:48 +01:00
Seth Hillbrand 888c01d11b pcbnew: Move tracks to std::deque 2019-06-01 09:53:23 -07:00
Jeff Young 69afa27a5f Implement ACTION_TOOLBAR and update some of the menus to ACTION_MENU.
This gives us better separation of MVC in line with the design of
the modern toolset.  It also reduces a whole bunch of duplicated
data.
2019-05-15 17:50:52 +01:00
Jeff Young f9e4ee1fc9 CONTEXT_MENU -> ACTION_MENU. (Now used for menu-bar menus too.) 2019-05-15 17:50:52 +01:00
Jeff Young f602ccd814 Insert EE_TOOL_BASE under SchEdit and LibEdit tools, and fix errant rename scope which clobbered PCBNew's PICKER_TOOL. 2019-05-12 13:47:08 +01:00
Jeff Young 7995b5cc3c Restore selection on abort and undo/redo.
Also includes a related bug fix to not create an undo record for
the initial schematic cleanup.

Fixes: lp:1825975
* https://bugs.launchpad.net/kicad/+bug/1825975
2019-05-11 15:38:49 +01:00
Jeff Young a967adbf26 Don't toggle selection twice when trying to select.
Also fixes issues with trying to use a CONTEXT_MENU as a wxMenu.
2019-04-23 14:19:55 +01:00
Jeff Young 1a007c3e4b Implement SCH_SELECTION_TOOL (but still with legacy semantics). 2019-04-22 22:08:18 +01:00
Tomasz Włostowski d50bc6a85f EDIT_TOOL: correctly handle locked items in Rotate/Flip/Mirror functions when the selection is already being dragged
Fixes: lp:1812009
* https://bugs.launchpad.net/kicad/+bug/1812009
2019-01-16 17:00:51 +01:00
Seth Hillbrand a8b3a3cc61 pcbnew: Allow capture of non-highlighted items
When routing in high-contrast mode, the user may wish to place items
that are primarily on a different layer while remaining in high contrast
mode.  This fixes a regression from 4.0.7

Fixes: lp:1804309
* https://bugs.launchpad.net/kicad/+bug/1804309
2019-01-08 11:38:06 -08:00
Seth Hillbrand 1c99784e92 pcbnew: Locked deletion prompting
Instead of a nag screen for locked items, we allow first the unlocked
items to be deleted and then, with a repeated request, the locked items.

This adds a popup cursor window informing the user of the option for
repeating the delete

Fixes: lp:1806507
* https://bugs.launchpad.net/kicad/+bug/1806507
2018-12-13 12:32:58 -08:00
Jeff Young 6d76097291 When running selectable() recursively, we're really only checking visibility.
Fixes: lp:1802949
* https://bugs.launchpad.net/kicad/+bug/1802949
2018-11-12 21:59:43 +00:00
Jeff Young 62e2fe8bbd Recurse for more detailed selectability tests.
Fixes: lp:1801709
* https://bugs.launchpad.net/kicad/+bug/1801709
2018-11-11 20:26:19 +00:00
Seth Hillbrand f11cb736e5 pcbnew: Zone selection heuristic continuity for edge
If the user is carefully selecting the zone edge, we do not filter the
zone preemptively from our disambiguation list in the same manner as we
do for selecting on zone copper.

Fixes: lp:1796719
* https://bugs.launchpad.net/kicad/+bug/1796719
2018-10-08 11:31:52 -07:00
Seth Hillbrand 6a6d580a1c pcbnew: Improve zone/polygon selection
Allows selection of polygons and zones by their visible area.  Will only
select polygons/filled areas when they are unobstructed by other
elements in the footprint/pcb.  Also adds a "skip heuristics" modifier
key for clicking (ALT) that allows the full disambiguation list to be
displayed without removing less-likely elements.  This dovetails the
zone/polygon selection as it allows selecting even when areas a fully
overlapped.

Fixes: lp:1753153
* https://bugs.launchpad.net/kicad/+bug/1753153
2018-10-03 06:23:35 -07:00
Jeff Young c91e51f688 Don't inadventently clear selection reference point.
New algorithm more targetted and just clears the items.  This
also obviates the need for the aQuietMode flags.

Only fixes one part of the bug, but the "fixes" line is the
easiest way to get a link in the bug to the commit.

Fixes: lp:1786727
* https://bugs.launchpad.net/kicad/+bug/1786727
2018-08-22 15:11:58 +01:00
Jeff Young a9fa66bb41 Don't broadcast events when running client selection filters.
Some other tools (in this case the POINT_EDITOR) aren't good
citizens and activate themselves when receiving selection
changes.

Fixes: lp:1785781
* https://bugs.launchpad.net/kicad/+bug/1785781
2018-08-08 01:44:56 +01:00
Jeff Young 05ef6f05d1 Move SanitizePads to CLIENT_SELECTION_FILTER architecture.
This not only reduces the number of different mechanisms, but
will also reduce (yet again) the number of Clarify Selection
pop-ups (because the CLIENT_SELECTION_FILTER runs before the
pop-up, while SanitizePads ran after it).

Fixes: lp:1710451
* https://bugs.launchpad.net/kicad/+bug/1710451

(cherry picked from commit e50a993)
2018-07-17 15:10:18 +01:00
Jeff Young 3e190cee4b Implement selection brightening for DRC.
The old item pointers (which aren't safe to keep around) were
removed in favour of opaque references (void*) which are then
compared against existing items when needed.

Also improves brightening by brightening the whole footprint
(ie: its pads, drawings, reference and value) rather than just
its target cross.

(cherry picked from commit 30e90b0)
2018-07-17 15:09:40 +01:00