Commit Graph

1388 Commits

Author SHA1 Message Date
Jeff Young 872826085a Filter PCBNew contents when pasting into Footprint Editor.
Fixes: lp:1850724
* https://bugs.launchpad.net/kicad/+bug/1850724
2019-11-05 17:22:51 +00:00
Jeff Young 48c8ac9663 Added new action for "Change Track Width".
Default out-of-the-box is no hotkey. Removed all the preference stuff.

Note that the new implementation is a little different: the old one only
operated on a selection with a single item where the new one operates on
all selected items. So if you want the whole track do a 'U' before the 'W'
(or whatever you have Change Track Width assigned to).

Fixes: lp:1844023
* https://bugs.launchpad.net/kicad/+bug/1844023
2019-11-05 17:22:51 +00:00
Seth Hillbrand dc5e8aa609 pcbnew: Performance improvement on moving items
This adjusts the fix for 1813038 to focus on the duplicate ghost,
preventing the need to unselect/reselect in every cycle.  This improves
large move speeds substantially
2019-11-01 10:00:38 -07: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
jean-pierre charras bc5dcf182f keepout in footprint: fix some crashes and issues. Create a specific type (PCB_MODULE_ZONE_AREA_T) for zones in footprint. The new class (MODULE_ZONE_CONTAINER) is the same as ZONE_CONTAINER, but the type ID is PCB_MODULE_ZONE_AREA_T instead of PCB_ZONE_AREA_T.
This is mandatory because these zones must be handled differently in many functions.
2019-10-29 11:24:57 +01:00
Ross Schlaikjer 64a42ffa35 Add keepout in footprints: Starting point. 2019-10-29 11:24:30 +01:00
Seth Hillbrand 39241dc0ff Footprint browser: Handle frame calls
The frame() call requires an edit frame but the browser is derived from
PCB_BASE_FRAME.

Fixes: lp:1849962
* https://bugs.launchpad.net/kicad/+bug/1849962
2019-10-26 08:27:27 -07:00
Seth Hillbrand bae50fab9f pcbnew: Fix 45° snapping polygons
The constrained draw was constraining the polygon size to fit the
existing points rather than extending the existing points to fit the
user's intent.

This adds a 90° double-joint for the completion polygon that allows the
user to complete common constrained polygons visually based on the
preview with a double-click to finish.
2019-10-24 16:01:14 -07:00
jean-pierre charras 4813eb12e6 DIALOG_POSITION_RELATIVE: fix some issues: wxWidgets alerts and unit selection not taken in account after the first run.
Fixes: lp:1849231
https://bugs.launchpad.net/kicad/+bug/1849231
2019-10-22 14:09:11 +02:00
Seth Hillbrand 8f1c1cf298 pcbnew: Don't limit editing of the polygons
45 deg contraints are not saved per polygon, so don't limit per polygon.
The constraint is only enforced during creation.

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

Fixes: lp:1846029
* https://bugs.launchpad.net/kicad/+bug/1846029
2019-10-20 09:29:42 -07:00
Seth Hillbrand 2e1af66a2b pcbnew: Commit polygon points to new constrained zone
Adds leader points if they are not already existing in the zone

Fixes: lp:1846028
* https://bugs.launchpad.net/kicad/+bug/1846028
2019-10-20 09:29:35 -07:00
Jeff Young e73e7bdc23 Process via size inc/dec commands while running via tool.
Fixes: lp:1846320
* https://bugs.launchpad.net/kicad/+bug/1846320
2019-10-17 20:17:26 +01:00
Jeff Young 0995433601 Map nets (if possible) from clipboard to destination.
Fixes: lp:1795057
* https://bugs.launchpad.net/kicad/+bug/1795057
2019-10-17 18:04:07 +01:00
Seth Hillbrand cecfeea947 pcbnew: Remove snapping to hidden items
Items and layers that are hidden in the view should not be used as snap
points.  This happens in multiple locations:
1) Grid Helper for normal tools
2) TOOL_BASE::snapToItem for router

Resolves KiPro Issue #116

Fixes: lp:1833128
* https://bugs.launchpad.net/kicad/+bug/1833128
2019-10-10 09:37:25 -07:00
Ian McInerney 0aa5424511 pcbnew: Switch over some drawing tools to use PrimeTool
Before, if the tools were activated from the context menu,
they would start drawing where the menu item was selected
instead of where the menu was opened.
2019-10-03 19:04:36 +01:00
Jeff Young b58df5e777 Flip Start0 etc. when in ModEdit.
ModEdit and PCBNew use Start0/End0/etc. differently so care must
be taken when flipping.

Fixes: lp:1845402
* https://bugs.launchpad.net/kicad/+bug/1845402
2019-10-01 11:02:52 +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
jean-pierre charras 072ea9a33e Pcbnew: flip command: when flipping only one item, flip it around its anchor instead of its bounding box.
This is the behavior of previous 5.1 version.
Using the bounding box has advantages, but unfortunately in many cases the footprint position is moved.
If a lot of flip commands are made on the same footprint, it is moved far from its initial position.
2019-09-17 10:06:39 +02:00
Jeff Young 7dc9beaf11 Add type filter to push pad properties.
Fixes: lp:1827820
* https://bugs.launchpad.net/kicad/+bug/1827820
2019-09-08 23:50:36 +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 6688e80131 Update description in footprint tree when it's edited.
Also implements a more useful message panel for Footprint Editor.

Fixes: lp:1842660
* https://bugs.launchpad.net/kicad/+bug/1842660
2019-09-04 17:19:25 +01:00
Jeff Young 720de6bae1 Cleanup. 2019-09-03 17:16:27 +01:00
Jeff Young 9a6c534e60 Another try at the duplicate-then-move ghosting bug.
Fixes: lp:1813038
* https://bugs.launchpad.net/kicad/+bug/1813038
2019-09-03 16:51:00 +01:00
Jeff Young 4c9e4c947c Fix for move-after-duplicate only needs the extra update once.
This version will be quite a bit more performant.

Fixes: lp:1813038
* https://bugs.launchpad.net/kicad/+bug/1813038
2019-09-02 20:46:06 +01:00
Jeff Young 315a99e0fe Use Move() instead of SetPosition() so that the second pt gets updated too.
Fixes: lp:1841989
* https://bugs.launchpad.net/kicad/+bug/1841989
2019-08-30 23:32:17 +01:00
Jeff Young 79d062aefc Don't allow selection dragging when a picker tool is running.
Fixes: lp:1841691
* https://bugs.launchpad.net/kicad/+bug/1841691
2019-08-30 10:33:34 +01:00
Jeff Young d2cd659471 Be better about cleaning up mouse capture.
Fixes: lp:1841996
* https://bugs.launchpad.net/kicad/+bug/1841996
2019-08-29 23:56:16 +01:00
Jeff Young 359cf384de Import graphics is a one-shot, not a tool.
Fixes: lp:1841975
* https://bugs.launchpad.net/kicad/+bug/1841975
2019-08-29 23:56:16 +01:00
Seth Hillbrand 64c012c175 modedit: Enable snapping on anchors
The selection of footprint anchor should obey normal snapping paradigm.
2019-08-28 10:38:27 -07:00
Jeff Young a5a237ac32 Improve readability of flag checking. 2019-08-27 19:23:07 +01:00
Seth Hillbrand b3615b36bb pcbnew: Retain 45° constraint
This also finishes the polygon with 45° lines when chosen as a create
option.

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

(cherry picked from commit fccce265aa)
2019-08-26 14:36:23 -07:00
Jeff Young 03da721030 Move events to wxFormBuilder and fix the missing hookup.
Fixes: lp:1841361
* https://bugs.launchpad.net/kicad/+bug/1841361
2019-08-25 20:48:47 +01:00
Jeff Young 2622f875ee Simplify the pad tool menus a bit. 2019-08-24 17:13:35 +01:00
Seth Hillbrand 8576668eba pcbnew: Snap items to grouped layers
When moving a group of items, the allowed snapping layers should be each
layer in the group, not just the first item's LSET.

Fixes: lp:1830164
* https://bugs.launchpad.net/kicad/+bug/1830164
2019-08-21 12:32:13 -07:00
Jeff Young aaa44b7348 Honor the {0, 0} reference on the clipboard.
Fixes: lp:1840819
* https://bugs.launchpad.net/kicad/+bug/1840819
2019-08-20 19:57:36 +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 b219fbc3d2 Implement undo/redo for lock/unlock/toggle lock.
Fixes: lp:1840770
* https://bugs.launchpad.net/kicad/+bug/1840770
2019-08-20 16:39:40 +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
Seth Hillbrand 959a4bdded pcbnew: Don't stack same tool handler
The Get and place tool used to live in selection tool and could activate
the edit tool by stacking calls.  Now that it is itself in the edit
tool, we cannot stack another call to the edit tool that runs
immediately, instead we allow the GetAndPlace to finish before beginning
the next tool (Move)
2019-08-14 17:12:00 -07: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 3bf24fae7a Set selection reference point to top-left item.
Fixes: lp:1771016
* https://bugs.launchpad.net/kicad/+bug/1771016
2019-08-12 22:21:09 +01:00
Jeff Young cc0bd9a171 Even out PCB_EDITOR_CONTROL and PCB_INSPECTION_TOOL. 2019-08-12 22:21:09 +01:00
Michael Kavanagh 79b2ff7551 Refactor deleteTool ACTION removing duplicates 2019-08-12 13:49:55 -04: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
Jeff Young c60118b6a4 Ativate delete tool so it can display the selection clarification menu when needed.
Fixes: lp:1835371
* https://bugs.launchpad.net/kicad/+bug/1835371
2019-08-03 22:17:31 -06:00
Jeff Young 01e78b04c6 Save last-used-paths in export dialogs.
Also fixes the export GenCAD dialog so that browse correctly updates
the textbox.

Fixes: lp:1793761
* https://bugs.launchpad.net/kicad/+bug/1793761
2019-08-02 21:03:48 -06:00
Jeff Young b8a03be869 Flip block around center instead of first item's anchor.
Fixes: lp:1789775
* https://bugs.launchpad.net/kicad/+bug/1789775
2019-08-02 16:07:25 -06:00