Commit Graph

1024 Commits

Author SHA1 Message Date
Jeff Young 6764cda34d Fix issues with pad locking.
Fixes: lp:1794548
* https://bugs.launchpad.net/kicad/+bug/1794548
2018-09-26 21:57:35 +01:00
Seth Hillbrand 65678b223a pcbnew: Fixup for 491098af3
Unselecting performs two functions: unselecting and unhighlighting.
Some items may be deselected but still live in the temporary highlighted
layer (e.g. selecting a footprint and exchanging it).  Since there is no
harm in unselecting an unselected item, we can allow it to proceed
without the check.
2018-09-26 08:54:09 -07:00
Jeff Young 37f7faf433 Move lock checks to CLIENT_SELECTION_FILTER.
Also checks render item visibility as well as layer visibility
when making selections.

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

Fixes: lp:1541756
* https://bugs.launchpad.net/kicad/+bug/1541756
2018-09-25 17:56:38 +01:00
Seth Hillbrand ee465fb23c pcbnew: Fixup for edde02481 to enable aux axis
Correcting edde02481 which had side effects to
efdbc91e42 while dragging a line but not a
zone.
2018-09-24 14:29:23 -07:00
Seth Hillbrand edde02481e pcbnew: Fix alignment with off-grid drag
Commit efdbc91e42 broken the primary
alignment mechanism for maintaining the current point as an auxilliary
grid reference.  This reverts that commit and fixes both the initial
issue and the associated bug by applying the primary constraint after
the secondary.  In this way, we consider the secondary constraint as an
additive rather than alternative constraint.

Fixes: lp:1793888
* https://bugs.launchpad.net/kicad/+bug/1793888
2018-09-24 14:07:30 -07:00
Jeff Young f3c6e1fb62 Change Position Relative To to use anchor, not centroid.
Fixes: lp:1793984
* https://bugs.launchpad.net/kicad/+bug/1793984
2018-09-24 00:42:56 +01:00
Seth Hillbrand 518b53f78c pcbnew: Cancel highlight with ESC
When editing the pcb, Ctrl-Click will highlight a net.  This allows
de-highlight with the ESC/cancel action from the selection tool.  Inside
the highlight tool, ESC reverts to the selection tool while keeping the
net highlighted.

Fixes: lp:1793842
* https://bugs.launchpad.net/kicad/+bug/1793842
2018-09-23 15:09:18 -07:00
Seth Hillbrand e0316af69c pcbnew: Prevent redo while moving items
Fixes: lp:1793948
* https://bugs.launchpad.net/kicad/+bug/1793948

(cherry picked from commit c5c89fd216)
2018-09-23 06:03:41 -07:00
Jeff Young 5974899fa5 Clean up file locations and names. 2018-09-22 16:23:13 +01:00
Seth Hillbrand 969e85daa3 pcbnew: Standardize zone fills threading
This is a boyscouting commit to standardize the threading of zone fills.
We do not need to join threads after their completion, instead we simply
allow them to clean up their memory without blocking the user.  This
also sets the maximum number of threads that may be created to the
number of zones being filled.  More than this will only leave un-used
threads being created and immediately killed.

We also include the connectivity search as a phase in the fill progress
reporter.  This was the case before but did not utilize the correct
maxsize, leading to stalled progress bar.
2018-09-21 12:44:20 -07:00
Jeff Young 04534c83e0 Allow marker selection in high-contrast mode.
Fixes: lp:1793357
* https://bugs.launchpad.net/kicad/+bug/1793357
2018-09-20 21:54:47 +01:00
Seth Hillbrand 47fac8a259 Removing some unused code 2018-09-20 12:52:53 -07:00
Wayne Stambaugh ed94f2c5e0 Pcbnew: fix minor bug in find dialog.
Repeating find with the same search string would result in a not found
error for absolute search strings.  Don't clear the found item if the
search string did not change from the previous search..

Fix another minor bug where the do not warp mouse pointer option was
always checked when the find dialog was called from one of the gal
canvases.

Fixes lp:1793300

https://bugs.launchpad.net/kicad/+bug/1793300
2018-09-19 12:31:17 -04:00
Seth Hillbrand 7470d5ba98 pcbnew: retain selection between edits
We had been deselecting items after calling edits to be safe in case the
item was deleted/exchanged by the edit.  The item pointer itself remains
valid even when deleting as it is assigned to the undo stack.  But it
should not remain visible or selected on the schematic if it is removed.

This tests for removed items by checking whether it (in the case of
first-level BOARD_ITEMS) or its parent (in the case of footprint item
components) remain in the view list after editing.  If they are still in
the view list, then we re-select them.

( cherry-picked from 2c6d0ffe2 )
Fixes: lp:1765774
* https://bugs.launchpad.net/kicad/+bug/1765774

Fixes: lp:1775946
* https://bugs.launchpad.net/kicad/+bug/1775946
2018-09-17 10:58:42 -07:00
Jeff Young 99cb1471c3 Added safety for POINT_EDITOR.
Fixes: lp:1786349
* https://bugs.launchpad.net/kicad/+bug/1786349
2018-09-17 18:01:08 +01:00
Jeff Young a40ab768fc Allow deletion of non-Reference/non-Value module text items.
Fixes: lp:1781226
* https://bugs.launchpad.net/kicad/+bug/1781226
2018-09-17 18:01:08 +01:00
Seth Hillbrand dd228b60a7 pcbnew: Allow removing corners from graphical polygons
( cherry-picked from 22df4e301 )

Fixes: lp:1792712
* https://bugs.launchpad.net/kicad/+bug/1792712
2018-09-16 10:27:07 -07:00
Seth Hillbrand cf2980e1b2 pcbnew: Add corners in polygons
Allow corner adding to polygons in both module editor and board editor.
The board editor was already allowed but only through special types.
The module editor is now sychronized to the same process and both
recognize standard context menus

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

( cherry-picked from 06ac172c2 )
2018-09-15 10:02:58 -07:00
Seth Hillbrand efdbc91e42 pcbnew: snap final points to grid
When constraining moves, the cursor snaps to grid but does not
represent the position of the final edited point.  The point is rotated
to the nearest snap angle, while the vector length remains unchanged
resulting in a line longer than intended and off-grid.

This adds a grid-snap after the constraint is applied.

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

( cherry-picked from e7c51a6a6 )
2018-09-15 09:53:52 -07:00
Jeff Young e3f74646b9 Allow measure tool to survive zoom and pan.
Fixes: lp:1792232
* https://bugs.launchpad.net/kicad/+bug/1792232
2018-09-14 11:00:13 +01:00
Seth Hillbrand ded64aef3d pcbnew: Control cursor capture in microwave tool
Turns off cursor capture when the microwave tool is not actively drawing
a new inductor.

Fixes: lp:1792128
* https://bugs.launchpad.net/kicad/+bug/1792128
2018-09-12 09:11:48 -07:00
Seth Hillbrand 21ea31af15 pcbnew: Allow selection of back pads
Pads should be selectable when the respective copper layer is enabled.

Fixes: lp:1789084
* https://bugs.launchpad.net/kicad/+bug/1789084
2018-09-08 17:25:34 -07:00
Maciej Suminski 5993b33010 Relax selection discard rules for footprints with area larger than the viewport
Normally working at a zoom level when a footprint is not fully displayed
indicates that the user modifies other components. Selection Tool used
to discard footprints that had area larger than the viewport area, but
it may make sense to select them if there are no other candidates.

Fixes: lp:1789578
* https://bugs.launchpad.net/kicad/+bug/1789578
2018-09-05 11:26:02 +02:00
Seth Hillbrand 1d9c9cd10d pcbnew: Select copper through THT connections
This allows full copper connections even when THT changes a trace layer.
It avoides selecting the actual pad to prevent actions on the copper
connections from affecting the footprints as well.

Fixes: lp:1789807
* https://bugs.launchpad.net/kicad/+bug/1789807
2018-09-03 07:44:44 -07:00
Seth Hillbrand d45946396c pcbnew: Fix loop condition when unhighlighting modules
Text can be included in the same selection group as the parent module.
Thus if we clear the selection marker on a module's child elements we
also need to remove the element from the selection group.

Fixes: lp:1789418
* https://bugs.launchpad.net/kicad/+bug/1789418
2018-08-30 09:27:42 -07:00
Jeff Young c90a3efea2 Change KIDIALOG hashing algorithm to __FILE__ + __LINE__.
Using Title + Message wasn't working for all the dialogs which
did substitutions in the message (which was a lot of them).

Fixes: lp:1789348
* https://bugs.launchpad.net/kicad/+bug/1789348
2018-08-29 23:38:23 +01:00
Seth Hillbrand dc4125206b GAL: Add a selected item layer
The selected items should be displayed above the rest of the items but
below informational overlays.

Fixes: lp:1789505
* https://bugs.launchpad.net/kicad/+bug/1789505
2018-08-28 15:00:05 -07:00
Seth Hillbrand f4eaf55497 pcbnew: keep selected zone highlighted when moding
When adding a cutout to a zone, it helps to have the zone highlighted so
that you can see when zone you are operating on.
2018-08-28 14:59:54 -07:00
Tomasz Wlostowski 61fb3f6d0f pcbnew: bring back the autoplacer tool to GAL 2018-08-24 14:42:49 +02:00
Jeff Young ec9d38e21f Add filter to net selector widget.
Also fixes a bug where nets wouldn't get changed because the
pads weren't changed and so the pad nets would propagate and
wipe out the changed nets on the tracks.

Also includes warning dialogs that pad nets will be changed if the
track nets are.

Fixes: lp:1779854
* https://bugs.launchpad.net/kicad/+bug/1779854
2018-08-24 10:56:13 +01:00
Jeff Young 30bb911154 Bring PICKER_TOOL in line with other tools.
Use standard Magnetize() to handle grid and magnetic pads.

Use the standard menu from PCB_TOOL.  Delegating the menu to
the SELECTION_TOOL just caused grief.

Also brings clients (such as Position Relative To) into line,
and implements better Cancel behaviour.

Also improves visibility of modal status messages:
- moves Select Anchor message from status bar to popup
- moves Select Reference message from dialog to popup

Fixes: lp:1786727
* https://bugs.launchpad.net/kicad/+bug/1786727
2018-08-23 00:58:01 +01: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
Ronnie Gaensli 46fddab126 pcbnew: fix pan while moving mouse after cancelling selection box
Fixes: lp:1776648
* https://bugs.launchpad.net/kicad/+bug/1776648
2018-08-17 13:39:36 +02:00
Jeff Young 43e99e6df0 Inflate footprint bounding box to include texts.
This makes zoom automatique work much better in the footprint
editor, and should improve other things which probably assumed
the bounding box included everything (such as refresh code).

Callers which still want just the module outline should call
GetFootprintRect() instead of GetBoundingBox().
2018-08-11 17:14:27 +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 84504599ce Don't check for visibles in the Footprint Editor.
Everything is drawn anyway, and we crash if the viewPrivData
hasn't been allocated yet.

Fixes: lp:1785716
* https://bugs.launchpad.net/kicad/+bug/1785716
2018-08-07 18:39:20 +01:00
John Beard a1e0735853 Add hotkey (Insert) for zone create corner
Adds a hotkey to the TOOL_ACTION, and also checks for
action validity prior to running the actions (previously
implicitly gated by  the enablement of the menu item).
2018-08-07 09:19:18 -07:00
Ronnie Gaensli 3ca84dca71 Cancel Add dimension leaves auto panning on
Fixes: lp:178551
* https://bugs.launchpad.net/kicad/+bug/178551
2018-08-06 11:24:23 +02:00
Jeff Young c655bffac1 Improve context menu consistency.
Also fixes some interactivity issues in the microwave tools around
single-click tools that have initial properties dialogs.  Those
need to act kind of like a hybrid between single-click and two-click
tools.

Fixes: lp:1751381
* https://bugs.launchpad.net/kicad/+bug/1751381
2018-08-02 11:01:03 +01:00
Jeff Young d6c6322f95 Leave measurement visible until another is started. 2018-08-02 11:01:03 +01:00
Seth Hillbrand 3a09358264 modedit: Store single copy of the footprint in undo
When changing elements in the module editor, each element shares the
same parent.  Undo commits store a copy of the parent as it existed
before the change.  For footprints with many elements, this creates
large, slow undo commits as a copy of the full footprint is stored for
each element being edited.

This keeps a single copy of the footprint in the undo stack per edit.

Fixes: lp:1780526
* https://bugs.launchpad.net/kicad/+bug/1780526
2018-08-01 11:06:23 -07:00
Jeff Young 9322139baa Touch up Footprint Viewer for new Lib Tree. 2018-08-01 11:47:48 +01:00
Jeff Young 9175a48c90 Enable Distribute H/V on pads.
Fixes: lp:1782988
* https://bugs.launchpad.net/kicad/+bug/1782988
2018-08-01 09:35:46 +01:00
Jeff Young b400565880 Convert Place Footprint to component tree. 2018-08-01 09:35:45 +01:00
Tomasz Wlostowski 099fcf1247 ZONE_CREATE_HELPER: fix zone cutout creation in zones with holes, reinit selection with the resulting zone
Fixes: lp:1784268
* https://bugs.launchpad.net/kicad/+bug/1784268
2018-07-31 22:34:56 +02:00
Maciej Suminski 630631b41b Code formatting 2018-07-26 16:04:31 +02:00
Tomasz Wlostowski a9af4d0141 ZONE_CREATE_HELPER: fixed crash when adding a cutout to a zone
Fixes: lp:1783541
* https://bugs.launchpad.net/kicad/+bug/1783541
2018-07-26 15:30:21 +02:00
John Beard 6df2d69b6e Add global zone fill/unfill to Edit menu
This means if you don't know the hotkey, the tool action can be
reached without having to activate the zone tool.

Fixes: lp:1783250
https://bugs.launchpad.net/kicad/+bug/1783250
2018-07-25 09:04:51 +02:00
John Beard 7acc0b89f9 Pcbnew: fix 45-degree snapping of ruler and dimension tools
This introduces a new util function in geometry_utils which snaps a vector
to axes or 45 degree lines. This can be used whenever you want to
snap a vector to these angles, but still want it to stay on a grid.

This snapping is used for the dimension tool and the ruler tool.

This is substantially simpler for two-point tools that the method
used by the line tool, which uses DIRECTION_45.

Fixes: lp:1780826
https://bugs.launchpad.net/kicad/+bug/1780826
2018-07-24 15:01:02 +01:00
Jeff Young afd80c3cdb Fix botched attempt to have ruler adjust to unit changes.
Also fixes the context menu so there's a specific one for the
measurement tool, allowing zooming for instance without cancelling
the tool.
2018-07-23 12:37:01 +01:00