Commit Graph

1072 Commits

Author SHA1 Message Date
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
Jeff Young 16b5f40817 Remove assert and update ruler units on the fly.
Fixes: lp:1781595
* https://bugs.launchpad.net/kicad/+bug/1781595
2018-07-23 02:02:02 +01:00
jean-pierre charras db712ea643 Footprint editor: display a warning when trying to created a custom pad shape with a Bezier curve.
Currently, Bezier curve (S_CURVE shape) is not supported in a custom pad shape.
2018-07-22 18:39:48 +02:00
jean-pierre charras 4cac974420 Add Bezier curve (S_CURVE shape) support in DIALOG_GRAPHIC_ITEM_PROPERTIES.
Fix some issues related to S_CURVE shape support.
2018-07-22 18:39:48 +02:00
jean-pierre charras 72d1597201 DXF import: add import of DXF splines that are converted to Bezier curves.
Fix also a lot of bugs related to Bezier curves (S_CURVE shape in DRAW_SEGMENT class) in Pcbnew code.
Add missing code to handle these Bezier curves
2018-07-22 18:39:47 +02:00
Jeff Young 5c646119a7 Allow user-specification of dimension units.
Also fixes a units bug when round-tripping a dimension through
the file format.

Fixes: lp:1782797
* https://bugs.launchpad.net/kicad/+bug/1782797
2018-07-21 13:50:21 +01:00
Jeff Young 99db5cb543 Allow for reduced nagging with wider use of KIDIALOG.
(cherry picked from commit c2dd5df)
2018-07-17 15:13:53 +01:00
Jeff Young 45e6dfc7af Simplify copy/paste of pad settings.
Fixes: lp:1743141
* https://bugs.launchpad.net/kicad/+bug/1743141

(cherry picked from commit 13ece03)
2018-07-17 15:13:39 +01:00
Jeff Young da69a7cd9c Enable position-relative tool in footprint editor.
Fixes: lp:1778624
* https://bugs.launchpad.net/kicad/+bug/1778624

(cherry picked from commit 3ee9703)
2018-07-17 15:12:43 +01:00
Jeff Young aab97c8385 Consolidate design rules UI.
Implement new Board Setup paged dialog which includes:
  Layers Setup
  Design Rules
  Solder Mask & Paste
  Text & Drawings

Moves line width and text properties to a layer-class-based
system.  Renames unlocked to upright (which also reverses the
logic).

New Edit Text and Graphic Properties dialog which replaces
Edit Footprint Text and adds layer-class-based editing and the
italic, upright and visibility properties.

Adds Import Settings functionality which allows settings to
be imported from another project at page granularity.

Also UNIT_BINDERizes the dialog and adds editing of pcb text.

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

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

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

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

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

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

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

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

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

(cherry picked from commit 3944a5e)
2018-07-17 15:12:34 +01:00
Jeff Young 5f3ee1e7ce More g_UserUnit erradication.
(cherry picked from commit 3f08780)
2018-07-17 15:12:31 +01:00
Jeff Young ae2cb331b1 Merge PCBnew text edit dialogs.
(cherry picked from commit 63b7738)
2018-07-17 15:12:24 +01:00
Jeff Young 2ff414adb4 Simplify Move Exactly and Postion Relative dialogs.
Also removes g_UserUnit references.

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

(cherry picked from commit 1639636)
2018-07-17 15:12:11 +01:00
Jeff Young 5ce0f8ba54 Kill off a few more g_UserUnit references.
(cherry picked from commit 452b1a7)
2018-07-17 15:12:07 +01:00
Jeff Young 92dcf43ae8 UNIT_BINDERize zone dialogs.
Also includes a bunch of changes to simplifiy the terminology
and unify the copper, non-copper and keepout versions.

Also removes some legacy features:
Removes contol for fill method.  If the fill method is currently
segments the dialog will ask if you want to convert to polygons
on OK.
Removes control of boundary resolution.  We've done this with trig
since 5.0.

(cherry picked from commit 487aaeb)
2018-07-17 15:11:32 +01:00
Jeff Young eacaa39aa2 Remove global units usage from GetSelectionText...
... and GetMsgPanelInfo.

Step 4 in the g_UserUnit eradication effort.

Also removes a couple of conversion routines that were close
enough to extinction.

(cherry picked from commit c75da51)
2018-07-17 15:11:09 +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 a39fb03822 Remove some references to g_UserUnit
(cherry picked from commit 614d832)
2018-07-17 15:09:56 +01:00
Jeff Young 74acb76e7f Switch UNIT_BINDER and DIALOG_SHIM to local units.
The general idea is to support user-units inheritance.  The
UNIT_BINDER allows wrapped controls to inherit units from their
parent dialog, while KEYWAY_HOLDER and DIALOG_SHIM allow child
KEYWAY_HOLDERs or DIALOG_SHIMs to inherit units from their
parent.

The GetUserUnits() method signature has to move to KEYWAY_HOLDER
rather than KEYWAY_PLAYER (where it makes more sense) as it’s the
only common ancestor of KEYWAY_PLAYER and DIALOG_SHIM.

As long as we'll be using the UNIT_BINDER more widely, it also
makes sense to move evaluation and validation into it.

This commit also provides eeschema’s DIALOG_LABEL_EDITOR and
pcbnew’s DIALOG_TRACK_VIA_PROPERTIES and DIALOG_SET_GRID as
models of how to use the new user-units inheritance, eval, and
validation.

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

(cherry picked from commit c8bc53e)
2018-07-17 15:09:53 +01:00
Jeff Young 6ad37972c0 Don't center objects behind the DRC dialog.
(cherry picked from commit d5bb39f)
2018-07-17 15:09:43 +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
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
John Beard 896ad3774d "Select Connection" menus enablement
Previously, the "Select Connection" sub-items were greyed out when the
selection contained both tracks and vias. This meant that you couldn't
access "Select Copper Connection" when the selection contained both
tracks and vias (though the keyboard shortcuts did work).

Change to use SELECTION_CONDITIONS::OnlyTypes( GENERAL_COLLECTOR::Tracks
) to allow any combination of track elements to be selected.

Fixes: lp:1772249
* https://bugs.launchpad.net/kicad/+bug/1772249
2018-06-11 10:58:26 -07:00
Jeff Young de7791cc8b Add context menu to footprint viewer for zoom & grid.
Fixes: lp:1776126
* https://bugs.launchpad.net/kicad/+bug/1776126
2018-06-11 11:37:48 +01:00
Seth Hillbrand a5b92a1fe4 Constrain dimension tool while creating
The dimension tool is optionally constrained (MD_CTRL) while editing the
dimension.  This ensures same behavior for the creation step.
2018-06-06 17:04:28 -07:00
Seth Hillbrand 0a91f0bc9c Add 45º constraints to lines when moving with CTRL
Fixes: lp:1774750
* https://bugs.launchpad.net/kicad/+bug/1774750
2018-06-02 15:52:18 -07:00
Seth Hillbrand da061718e5 Remove constraint on circle
Allows circle radius to snap to arbitrary points while editing

Fixes: lp:1773436
* https://bugs.launchpad.net/kicad/+bug/1773436
2018-05-25 12:30:47 -07:00
Jeff Young b89f6d4af3 Decrease allowed coverage ration when zones are involved.
A perfect solution would create holes in the coverage map
for the zone edges and handles, but that's a lot more
work.

Fixes: lp:1773204
* https://bugs.launchpad.net/kicad/+bug/1773204
2018-05-25 13:01:58 +01:00
Seth Hillbrand 8506cdf3ae Avoid numerical dereference of selections
The SELECTION is a std::set.  Numerical dereference of item n is O(n) as
the iterator is not random access.  Therefore, a for loop using
numerical dereference is O(n!) and quickly slows.

We avoid this by storing items to remove separately while iterating and
then removing the items after we complete.

Fixes: lp:1692081
* https://bugs.launchpad.net/kicad/+bug/1692081
2018-05-22 16:37:45 -07:00
Seth Hillbrand 8d52dc9451 Avoid re-checking items already selected
If you select a track with many segments (e.g. a length-tuned track) and
then select all connected items again ('U' -> 'U'), we would iterate
over all items in the selection and mark connections for each of the n
segments n separate times.

We avoid this by using the marked flag to show when the segment has
already been visited by the routine.  This means that if the segment has
been checked for connections because it was connected to the previous
item, it won't be checked for connections again.  However, a selection
that interleaves items from multiple connection segments will still
(potentially) be multiply checked as the BUSY flag is cleared each time
there is one not-BUSY track in the selection.
2018-05-22 16:26:52 -07:00
jean-pierre charras 6f249e5eb6 Add missing icons in lock/unlock context submenu 2018-05-22 14:36:35 +02:00
Seth Hillbrand 0c2f9b1827 Keep circles controlled by radius
Circles are defined by center and a point on their edge.  This requires
the user to do extra math to figure out the size of the circle.  The
patch allows the user to edit and draw circles using radial coordinates.
2018-05-20 17:16:44 -07:00
jean-pierre charras 45dad4ded5 DIALOG_POSITION_RELATIVE: make dialog more understandable.
Better texts, and add a helper comment.
2018-05-18 13:53:31 +02:00
jean-pierre charras 2832f997c5 PcbNew; fix crash on copy/paste
Due to a bug introduced by commit ba1e0efda that tried to fix an other bug.

Fixes: lp:1771003
https://bugs.launchpad.net/kicad/+bug/1771003
2018-05-13 21:50:59 +02:00
Jeff Young a9dc417319 Fix bug in pruning of selection.
Fixes: lp:1770939
* https://bugs.launchpad.net/kicad/+bug/1770939
2018-05-13 15:23:41 +01:00
jean-pierre charras ba1e0efdad Pcbnew, GAL mode: Fix incorrect management of zones in append board and copy from Paste from clipboard.
Fixes: lp:1770855
https://bugs.launchpad.net/kicad/+bug/1770855
2018-05-12 20:48:50 +02:00
Maciej Suminski 471e3de5a7 Fixed board append function, broken in 046e73ec
The previous implementation cleared all DLISTs, but has not added
everything back on append.
2018-05-08 11:21:55 +02:00
Maciej Suminski 8cb3aa79f2 pcbnew_control.cpp code formatting 2018-05-08 10:40:33 +02:00
Maciej Suminski 046e73ecac Clear the source DLIST when pasting items to a BOARD
Fixes the assert triggering when items already belonging to a list are
added to another one.
2018-05-08 10:40:33 +02:00
Seth Hillbrand 4c7f5f2a2f Allow disabling snap-to when placing vias
This allows the user to selectively disable the snap-to behavior when
placing stand-alone vias.  Full solution will require an update to the
segment distance calculation that takes into account the rounded line
caps.

Fixes: lp:1769523
* https://bugs.launchpad.net/kicad/+bug/1769523
2018-05-07 13:58:26 -07:00