Commit Graph

990 Commits

Author SHA1 Message Date
jean-pierre charras 4e3fe6c55d Make DRC markers always selectable.
Fixes: lp:1808181
https://bugs.launchpad.net/kicad/+bug/1808181
2018-12-16 09:30:29 +01:00
Jeff Young 9240a54f4a Allow marker selection in high-contrast mode.
Fixes: lp:1793357
* https://bugs.launchpad.net/kicad/+bug/1793357

(cherry picked from commit 04534c83e0)
2018-12-12 12:15:25 -08:00
Seth Hillbrand 50eedcf0b3 MSW Ratsnest: Force marking ratsnest dirty
When updating the status of the ratsnest, we mark its target layer as
dirty to ensure the revised data are used to draw/clear the ratsnest

Fixes: lp:1800301
* https://bugs.launchpad.net/kicad/+bug/1800301
2018-11-23 11:44:33 -08:00
Seth Hillbrand c0d9b9ab81 ratsnest: Fix state issue switching in local tool
The ratsnest layer needs to be always enabled in GAL rather than taken
from the board settings.  This also adds a finalize handler to the
picker tool that allows a picker-caller to perform a specific action
when the picker tool exits.  In this case, we use it to clear the local
ratsnest selections back to the default.

Fixes: lp:1800301
* https://bugs.launchpad.net/kicad/+bug/1800301
2018-11-20 20:13:15 -08:00
Seth Hillbrand b1805dd254 Ratsnest: Force update after modifying visible nets
After adjusting the ratsnest, we force the view update to re-draw the
ratsnest to the screen.  This is not required for Linux but seems to
have no ill effects and may help MSW show local ratsnest changes.

Possibly related to lp:1800301
2018-11-19 21:12:47 -08:00
Jeff Young 66b0aca696 Don't leave a selection with a deleted item in it.
Fixes: lp:1803730
* https://bugs.launchpad.net/kicad/+bug/1803730

(cherry picked from commit 5bb5aea936)
2018-11-19 16:07:41 +00:00
Seth Hillbrand 22fbf30f22 Ratsnest: Improve show heuristics
When the local ratsnest tool is used, it should toggle the state based
on the global ratsnest visibility.  After changing state, the layer
cache is marked as well.

Possibly related to lp:1800301
2018-11-18 19:57:37 -08:00
Seth Hillbrand 46f7011463 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

(cherry picked from commit f11cb736e5)
2018-10-08 11:34:38 -07:00
Seth Hillbrand dd22c73666 pcbnew: Allow deselection when clicking on zone
Deselection by clicking on a zone makes working with plane zones easier
by allowing the selected item to de-selected by clicking on a zone.
Once the selection is cleared, the zone may be re-selected as normal.
Clicking on non-zone items while a separate item is selected will still
select the new non-zone item without requiring a second click.
2018-10-06 07:22:35 -07:00
Seth Hillbrand d15b34988d pcbnew: Adjust selection behavior in highlight net
Prefer non-zones in highlight net in the same way we do for the
selection tool.  Highlight net just has separate logic and was missed
previously.
2018-10-05 19:58:25 -07:00
Seth Hillbrand 5e0ef36719 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

(cherry picked from commit 6a6d580a1c)
2018-10-03 07:22:16 -07:00
jean-pierre charras 6994291997 Re activate Zone Unfill All command, accidentally removed by a previous commit.
Fixes: lp:1795293
https://bugs.launchpad.net/kicad/+bug/1795293
2018-10-01 09:05:08 +02:00
Seth Hillbrand 59723ce3ab pcbnew: Handle SEGZONE in GAL
SEGZONEs are no longer created by pcbnew but may exist in older boards.
This allows deleting the old fills in a manner similar to the deletion
in Legacy canvas.

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

(cherry picked from commit ef6f7e96f3)
2018-09-29 15:12:24 -07:00
Seth Hillbrand 79d19d9055 pcbnew: Rename PCB_ZONE_T and remove from connectivity
SEGZONE types were confusingly named PCB_ZONE_T.  Zones in pcbnew are
now _only_ PCB_ZONE_AREA_T, so we name segzone types PCB_SEGZONE_T to be
clear.

This also removes processing of the SEGZONEs from connectivity
calculations.

(cherry picked from commit b3a5e08c2f)
2018-09-29 15:12:21 -07:00
Seth Hillbrand 115f318976 pcbnew: Avoid double-separators in context menu
(cherry picked from commit a81e3c2b13)
2018-09-29 15:10:10 -07:00
Seth Hillbrand c26311918e pcbnew: Deselect all items in a delete commit at once
Deselecting each individually had the side-effect of possibly re-drawing
the view in between actions, leading to visible artifacts in the router
(where invisible items are set visible before committing a change)

(cherry-picked from commit 491098af35)
(cherry picked from commit 65678b223a)
2018-09-26 09:06:48 -07:00
Seth Hillbrand 036288d18f pcbnew: Fixup for edde02481 to enable aux axis
Correcting edde02481 which had side effects to
efdbc91e42 while dragging a line but not a
zone.

(cherry picked from commit ee465fb23c)
2018-09-24 14:33:28 -07:00
Seth Hillbrand 8efdcbfaf1 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

(cherry picked from commit edde02481e)
2018-09-24 14:08:49 -07:00
Seth Hillbrand 9e61ebfb0b 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.

(cherry picked from commit 969e85daa3)
2018-09-24 06:38:52 -07:00
Seth Hillbrand 5ce0c2065c 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

(cherry picked from commit 518b53f78c)
2018-09-24 06:38:52 -07:00
Seth Hillbrand c5c89fd216 pcbnew: Prevent redo while moving items
Fixes: lp:1793948
* https://bugs.launchpad.net/kicad/+bug/1793948
2018-09-23 06:02:50 -07:00
Seth Hillbrand a4564db082 Removing some unused code
(cherry picked from commit 47fac8a259)
2018-09-20 16:47:59 -07:00
Wayne Stambaugh a055916f92 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:44:25 -04:00
Seth Hillbrand 2c6d0ffe27 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.

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

Fixes: lp:1775946
* https://bugs.launchpad.net/kicad/+bug/1775946
2018-09-17 10:39:31 -07:00
Seth Hillbrand 22df4e301b pcbnew: Allow removing corners from graphical polygons
Fixes: lp:1792712
* https://bugs.launchpad.net/kicad/+bug/1792712
2018-09-16 10:26:00 -07:00
Seth Hillbrand 06ac172c27 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
2018-09-15 09:53:31 -07:00
Seth Hillbrand e7c51a6a6c 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
2018-09-15 07:52:17 -07:00
Seth Hillbrand 61715a8df5 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:10:58 -07:00
Maciej Suminski 280573e9af 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

(cherry-picked from commit 5993b330)
2018-09-10 14:21:27 +02:00
Seth Hillbrand 3919345003 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:24:44 -07:00
Seth Hillbrand 9eec296b0a 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:43:59 -07:00
Ronnie Gaensli fbd6654f9a pcbnew: fix pan while moving mouse after cancelling selection box
Fixes: lp:1776648
* https://bugs.launchpad.net/kicad/+bug/1776648
2018-08-29 16:48:55 -07:00
Seth Hillbrand 20ea486378 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 14:58:37 -07:00
Seth Hillbrand 0c94b3239d 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:49:48 -07:00
Ronnie Gaensli 9d241ba812 Cancel Add dimension leaves auto panning on
Fixes: lp:178551
* https://bugs.launchpad.net/kicad/+bug/178551

(cherry picked from commit 3ca84dca)
2018-08-06 11:27:56 +02:00
Seth Hillbrand 016c02a42d 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:00:49 -07:00
Carsten Schoenert 9f7109826d fix misspelled 'allows to' -> 'allows one to'
Fixup small grammar issues around used 'allows to ...' almost in
code comments.
2018-07-11 10:35:03 -04:00
Seth Hillbrand e2122db587 pcbnew: Clear unused code 2018-06-21 09:20:48 -07:00
Seth Hillbrand 147c1e6088 pcbnew: Allow clearing local ratsnest
The local ratsnest needs to be able to hide as well as show visibility.
Clicking a module will toggle the visibility while clicking off all
modules clears the local ratsnest display.

Fixes: lp:1531332
* https://bugs.launchpad.net/kicad/+bug/1531332
2018-06-19 15:12:20 -07:00
Jeff Young feebb3a36c Don't double-move module text when parent is also selected.
Fixes: lp:1776871
* https://bugs.launchpad.net/kicad/+bug/1776871
2018-06-18 22:03:39 +01:00
Maciej Suminski 94b6f848bb pcbnew_control.cpp: change C-style asserts to wxCHECK/wxFAIL 2018-06-15 17:11:32 +02:00
Maciej Suminski eb97634bdf Enable 'Delete Item' toolbar icon in the Footprint Editor when the tool is active 2018-06-15 17:10:12 +02:00
Maciej Suminski 7d66dc0cc3 Fixed an assert on pasting items in the Footprint Library Editor
The assert in the title line verifies that an item does not belong to
any DLIST when it is being added to one. Items in clipboard are already
owned by DLISTs, therefore they need to be removed from the original
DLISTs before being added to new ones.
2018-06-15 14:35:55 +02:00
Andrzej Wolski 316ff2898d Fix footprint selection
Commit 72b49acc changed behavior of MODULE::ViewBBox(),
which now includes text fields area. This caused problems
with selecting footprints with relatively large text fields.
This patch fixes this problem by using MODULE::GetBoundingBox instead.

Fixes: lp:1776942
* https://bugs.launchpad.net/kicad/+bug/1776942
2018-06-14 19:32:09 -07:00
Seth Hillbrand 11ab8f6dc1 pcbnew: Fix a couple of duplicate hotkeys 2018-06-13 22:53:06 -07:00
Seth Hillbrand fb1aa56b77 modedit: Don't activate measure tool without a footprint
There's no risk in measuring an empty footprint but there's no benefit
either.  This matches the measure tool to the other, deactivated
footprint tools.
2018-06-12 16:48:59 -07:00
Seth Hillbrand 04706d9d02 pcbnew: Add placement hotkeys
Assigns configurable hotkeys to the placement commands.

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

Fixes: lp:1167895
* https://bugs.launchpad.net/kicad/+bug/1167895
2018-06-12 16:08:06 -07:00
jean-pierre charras cee313da8c Pcbnew: legacy canvas: make trace len display working while creating the trace.
Previously, the full trace length was always displayed as 0 during track creation in the info canvas.
2018-06-12 18:21:46 +02:00
Maciej Suminski 9605dd8e1d Fix selection clearance for via and tracks
- fixed via bounding box calculation in TRACK::GetBoundingBox()
- moved clearance to TRACK::ViewBBox()
- modified the Selection Tool to use EDA_ITEM::GetBoundingBox() rather
than VIEW_ITEM::ViewBBox() to determine selection

Fixes: lp:1776314
* https://bugs.launchpad.net/kicad/+bug/1776314
2018-06-12 10:59:30 +02:00
Seth Hillbrand 61c3bc4af4 pcbnew: Don't stage undo commits on new items
New items just being placed on the board are still temporary.  Although
we can modify their orientations/positions, we can't stage these changes
for undo/redo without corrupting the undo stack.

Fixes: lp:1776312
* https://bugs.launchpad.net/kicad/+bug/1776312
2018-06-11 16:43:30 -07:00