Commit Graph

1341 Commits

Author SHA1 Message Date
Jeff Young 2348537769 Add a command to toggle between last two highlighted nets. 2019-06-12 12:43:12 +01:00
Seth Hillbrand 60b98a8b4f Suppress non-Mac warning
The return variable is unused, so passing the pointer to a null lambda
drops the warning without incurring compile penalty.
2019-06-11 10:12:00 -07:00
Seth Hillbrand 32052d953f pcbnew: Fix STL blunder when deleting
Deleting objects from a container will invalidate the iterator that
contains the object.  Correct deleting requires capturing the iterator
returned by the erase function.

Fixes: lp:1832331
* https://bugs.launchpad.net/kicad/+bug/1832331
2019-06-11 10:12:00 -07:00
Jeff Young 7726b039b2 Re-jigger standard submenus so they both link AND work. 2019-06-11 18:03:16 +01:00
John Beard 9625cea57f Fix hotkey debug spew
Two issues:

* Unassigned hotkeys were being passed to WX in the menu strings as
  "<unassigned>". WX doesn't recognise this, and prints debug each time.
  Unassigned hotkeys are no longer rare or naughty, so we shouldn't provoke
  debug spew. Suppress by not appending hotkey strings for actions with 0
  (i.e. unassigned) hotkey IDs.
* The zone cutout tool uses GR_KB_SHIFT, not MD_SHIFT. This causes
  "unknown hotkey" spew from WX.
2019-06-11 14:40:57 +01:00
Jeff Young b36f982272 Fix typo introduced in DLIST erradication.
Fixes: lp:1832030
* https://bugs.launchpad.net/kicad/+bug/1832030
2019-06-11 01:00:43 +01:00
Jeff Young 6623ab91a8 Fix issue with picker tool activation. 2019-06-11 00:25:38 +01:00
Jeff Young e9017ce0b1 Update status bar when selected items are modified.
Fixes: lp:1831801
* https://bugs.launchpad.net/kicad/+bug/1831801
2019-06-10 23:46:01 +01:00
Jeff Young 31ee95c683 Reconcile tool and menu for Enumerate Pads.
Fixes: lp:1831950
* https://bugs.launchpad.net/kicad/+bug/1831950
2019-06-10 23:46:01 +01:00
Jeff Young bb96255a03 Fix dangerous static_cast-ing to wrong type. 2019-06-10 23:46:01 +01:00
Jeff Young 1f6a5c92d7 Make sure placement menu has a pointer back to its tool.
Fixes: lp:1831730
* https://bugs.launchpad.net/kicad/+bug/1831730
2019-06-10 23:46:01 +01:00
Jeff Young 5e49517781 Move hotkeys to ACTION architecture. 2019-06-10 23:46:00 +01:00
Jeff Young 765606012f Convert separate-compilation of selection.cpp to polymorphism. 2019-06-10 23:46:00 +01:00
Jeff Young e606587ff6 Move remaining Symbol Tree ctx menu cmds to ACTIONS.
Also moves the various Player instantiators down into COMMON_TOOLS
for better sharing.
2019-06-10 23:46:00 +01:00
Seth Hillbrand 81c5ba257b pcbnew: Ensure cursor remains set during tool activity
Mouse capture end is called by some actions such as save board.  This
resets the cursor image but doesn't change the current tool.  Resetting
the cursor image during action prevents this.

(cherry picked from commit 35e87128f5)

Fixes: lp:1831888
* https://bugs.launchpad.net/kicad/+bug/1831888
2019-06-08 10:25:24 -07:00
jean-pierre charras f1f26a9197 drc_clearance_test_functions.cpp: remove a stupid "optimization code" that creates broken tests (sorry to be rude)
Fixes: lp:1831776
https://bugs.launchpad.net/kicad/+bug/1831776
2019-06-06 13:13:37 +02:00
Jeff Young 6fab7cc025 Remove a bunch of ugly mutex hacks now that we don't use wxString's UTF8 mode anymore. 2019-06-05 21:23:41 +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
Jeff Young 15241b7fcf ACTION-ize toolbar/palette control. 2019-06-04 22:31:42 +01:00
Jeff Young 1222f3cc72 ACTION-ize fab outputs. 2019-06-04 22:31:42 +01:00
Jeff Young 1ea5b04e22 More ACTIONS work. Nearly done now. 2019-06-04 22:31:42 +01:00
Jeff Young 4e11dcfa31 Better error reporting for board edge collisions. 2019-06-04 13:56:54 +01:00
Jeff Young fbfbb64387 A bit of cleanup of stale DRC code. 2019-06-04 13:56:54 +01:00
Jeff Young 1bf04d1722 More ACTIONs work. 2019-06-04 00:51:16 +01:00
Jeff Young 584ed9e204 Add files accidentally left out of last commit. 2019-06-04 00:51:16 +01:00
Jeff Young 59a01789ff Show board info in status bar when seleciton isn't a single object.
Fixes: lp:1831402
* https://bugs.launchpad.net/kicad/+bug/1831402
2019-06-03 21:52:59 +01:00
Jeff Young 3912c7407f Move global commands to ACTIONs.
Also fixes a crash bug opening Edit Tracks and Vias dialog.
2019-06-03 21:08:30 +01:00
Jeff Young 568c8c336b Move DRC control to a tool; move assorted commands to ACTIONS. 2019-06-03 21:08:30 +01:00
Jeff Young 9f1e2e34b7 Move some dupicated tools to common tools. 2019-06-03 21:08:30 +01:00
jean-pierre charras be54f357eb Better tooltip, more easy to translate 2019-06-03 18:27:17 +02:00
Seth Hillbrand 95ab0b1813 pcbnew: Hide dynamic ratsnest after canceling edit
The dynamic ratsnest is shown while moving items but this needs to be
hidden after cancelling.  Previously this was handled by the
SelectionClear event but we've changed this to (correctly) keep the
previous selection when canceling.

Fixes: lp:1831350
* https://bugs.launchpad.net/kicad/+bug/1831350
2019-06-02 20:25:02 -07:00
Seth Hillbrand 1f30d0c803 pcbnew: remove the last dlist components from pcbnew 2019-06-02 20:06:11 -07:00
Seth Hillbrand 99756efea5 Use GetFirstModule() for call that can be NULL 2019-06-02 20:06:11 -07:00
Ian McInerney cbea5149cb pcbnew: Cleanup context menu ordering 2019-06-02 21:10:56 +01:00
Jeff Young da4fe27447 More ACTIONS work. 2019-06-02 21:10:56 +01:00
Jeff Young 33773bad4d Yet more command conversions to ACTIONs. 2019-06-02 21:10:56 +01:00
Jeff Young 6ac273264d Move Show3DViewer to common action. 2019-06-02 16:21:44 +01:00
Ian McInerney 208a8553a5 pcbnew: Add context menu to measure tool
Fixes: lp:1831063
* https://bugs.launchpad.net/kicad/+bug/1831063
2019-06-02 07:55:29 -07:00
Seth Hillbrand 6a45446496 pcbnew: Remove the last dlist from modules/pcbnew 2019-06-01 20:55:32 -07:00
Seth Hillbrand 9163ac543a pcbnew: Move pads to std::deque 2019-06-01 16:23:54 -07:00
Seth Hillbrand 888c01d11b pcbnew: Move tracks to std::deque 2019-06-01 09:53:23 -07:00
Seth Hillbrand d1877d7c1b Moving modules from DLIST to std::deque 2019-06-01 09:53:23 -07:00
Seth Hillbrand 961b22d603 pcbnew: Changing drawings from dlist to std::deque 2019-06-01 09:51:57 -07:00
Jeff Young f67df4bf11 Collapse ARRAY_CREATOR into single class now that legacy instance is gone.
Also removes AllowLegacyCanvas ADVANCED_CONFIG option.
2019-06-01 16:29:12 +01:00
Jeff Young c1298570cb Remove legacy routing options. 2019-06-01 16:29:12 +01:00
Jeff Young 7553cc2651 Clean up some dangling legacy odds and ends. 2019-06-01 01:17:46 +01:00
jean-pierre charras 30ad8e9369 Pcbnew, file menu: fix missing initialization of Append Board menuitem 2019-05-31 18:28:31 +02:00
Jon Evans d0926cce58 PcbNew: prevent crash in point editor if selection gets invalidated 2019-05-29 21:27:59 -04:00
Jeff Young 1e9da7f57b Remove CurItem() architecture and legacy routers and drawing code. 2019-05-29 00:26:30 +01:00
Jeff Young 0260b32125 Push resetLocalCoords down into COMMON_TOOLS.
Fixes: lp:1830693
* https://bugs.launchpad.net/kicad/+bug/1830693
2019-05-29 00:26:29 +01:00
Jeff Young 6936effaa7 Implement undo for Page Settings in PlEditor, Eeschema and PCBNew.
Fixes: lp:1820059
* https://bugs.launchpad.net/kicad/+bug/1820059
2019-05-27 11:58:55 +01:00
Jon Evans 638ac3838c PcbNew: Fix layer alpha overrides being overwritten by color changes
Fixes: lp:1827518
* https://bugs.launchpad.net/kicad/+bug/1827518

(cherry picked from commit cb3edf2607)
2019-05-26 20:20:53 -04:00
jean-pierre charras 568d4e2b19 Avoid including id.h in a lot of files that do not use it. 2019-05-26 08:14:25 +02:00
Jeff Young 85f984ccd9 Add point-editor activation for immediate-mode drawing. 2019-05-24 19:49:09 +01:00
Jeff Young 323bb0f8e1 Moving PageLayout editor to GAL canvas and modern toolset. 2019-05-24 19:49:09 +01:00
jean-pierre charras 75cea18f07 Pcbnew, toolbars: fix incorrect icons 2019-05-23 11:07:55 +02:00
Jeff Young 67cc2aac2e Rework Eeschema find/replace for modern toolset.
Fixes: lp:1827274
* https://bugs.launchpad.net/kicad/+bug/1827274

Fixes: lp:1827240
* https://bugs.launchpad.net/kicad/+bug/1827240
2019-05-22 21:48:04 +01:00
Jeff Young b90b454ada Remove legacy block operations. 2019-05-18 00:21:49 +01:00
Jeff Young 1a3d0492f5 Push polar coords down into COMMON_TOOLS. 2019-05-18 00:21:49 +01:00
Jeff Young 97445f1714 Don't go into interactive move when position was set in creation dialog.
Fixes: lp:1822569
* https://bugs.launchpad.net/kicad/+bug/1822569
2019-05-16 19:57:06 +01:00
Jeff Young fbb807f3bb Move some more menu & toolbar items to modern toolset. 2019-05-16 19:57:06 +01: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 eb3a201d39 Move some PCBNew and GerbView actions to their COMMON equivalents. 2019-05-15 17:50:52 +01:00
Jeff Young ef5c69167a Start moving some LibEdit and SchEdit menubar menus to actions.
Also includes a bunch of bug fixes that got intermingled.

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

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

Fixes: lp:1828793
* https://bugs.launchpad.net/kicad/+bug/1828793
2019-05-13 21:44:29 +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
Martin McNamara 7200f4d7b5 PCBnew: Fixes crosshair issue with "Place Text" and "Add Dimension".
When using "Place Text" the crosshair was freezing if cancelled before
placing text.

After the crosshair freezes, the next uses of the "Place Text" or
"Add Dimension" caused the crosshair to jump to the screen location
where the previously the crosshair was frozen.

Cancelling the "Add Dimension" caused the crosshair to jump to the
screen location where the crosshair was when cancelled on the next use
of the "Place Text" or "Add Dimension".

Fixes: lp:1822578
* https://bugs.launchpad.net/kicad/+bug/1822578
2019-05-11 06:44:40 -07:00
Jeff Young c1539ae014 Naming changes to reflect sharing between SchEdit and LibEdit. 2019-05-10 19:56:20 +01:00
Jeff Young ea0941cab3 Implement modern tools for LibEdit. 2019-05-10 16:11:57 +01:00
Seth Hillbrand f7c042a357 pcbnew: Allow curves in custom pads
Updates custom pad functions to permit adding arbitrary curves to the
primitives
2019-05-08 15:54:26 -07:00
Jeff Young fd546da640 Homogenize hit testing and selection return types.
Prep work for sharing SCH_SELECTION_TOOL with LibEdit.
2019-05-05 17:14:30 +01:00
Jeff Young ed0e6af66d Move to direct tool registration.
It was confusing that the primary frames registered their tools
differently than the other frames.  In addition, since the other
frames also added their own tools, foo_actions::RegisterAllTools()
didn't really register all tool but rather those used by the
principal frame (PCB_EDIT_FRAME, SCH_EDIT_FRAME, etc.)
2019-05-05 17:14:30 +01:00
Jeff Young f81007f74b Some clean-up and moving message panel update to selection event. 2019-05-05 17:12:59 +01:00
Jeff Young 902be18a04 More modern toolset context menu work.
Text/label type changes and bus entry shape changes.  And some
context menu bug fixing.
2019-05-05 17:12:59 +01:00
Jeff Young 42383ae871 Build out some of the modern toolkit context menus. 2019-05-05 17:12:59 +01:00
Jeff Young 4e0208dfba Move duplicate item and block to modern toolset. 2019-05-05 17:12:59 +01:00
Jon Evans 722edda83c Make it easier to select footprints that overlap pads on opposite side 2019-05-04 22:59:56 -04: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
Jeff Young e885d739a4 Simiplify VECTOR2 -> wxPoint conversions.
There has always been an operator specified, but it's explicit so
most folks don't notice it.
2019-04-22 22:08:18 +01:00
Jon Evans 1d2db311b2 Set new module parent early enough to allow pad clearance to be shown
Fixes: lp:1824587
* https://bugs.launchpad.net/kicad/+bug/1824587
2019-04-14 14:25:38 -04:00
Jeff Young b63fab92cf Move Eeschema net highlighting to modern toolset. 2019-04-14 12:10:48 +01:00
Jeff Young 94a948fdd1 Move grid selection for both Eeschema and Pcbnew to COMMON_TOOLS. 2019-04-13 18:43:35 +01:00
Jeff Young fc7f5630c7 Move eeschema zoom operations to modern toolset. 2019-04-13 18:43:26 +01:00
Jeff Young dae41b7460 Remove legacy segment-based zones.
Give the user the option of cancelling a file open if there are
segment zones; otherwise they're converted to polygon fills.

Fixes: lp:1823087
* https://bugs.launchpad.net/kicad/+bug/1823087
2019-04-12 20:19:23 +01:00
Jon Evans 3d9b5daf9c Improve selection behavior of DRC markers in DRC dialog list
Fixes: lp:1813373
* https://bugs.launchpad.net/kicad/+bug/1813373
2019-04-12 11:01:38 -04:00
MaPePeR e7d32c54b9 pcbnew: Draw Ratsnest with arcs to avoid overlap
Adds a toggle button that allows switching between straight lines and
curves for the ratsnest lines.

Fixes: lp:1766597
* https://bugs.launchpad.net/kicad/+bug/1766597
2019-04-12 00:28:58 +01:00
Jeff Young 3c11b89e4c Hook up refresh buttons to library tree synchronisation.
Fixes: lp:1820057
* https://bugs.launchpad.net/kicad/+bug/1820057
2019-04-11 19:45:10 +01:00
Seth Hillbrand c8118e3ce4 pcbnew: Allow click+drag of tracks
This behavior existed in 5.0.x but did not properly exit the edit tool
in 5.1.  This removes stops the edit tool when we begin dragging a track
using the interactive router.

Fixes: lp:1820312
* https://bugs.launchpad.net/kicad/+bug/1820312
2019-04-07 20:59:06 -07:00
Seth Hillbrand 24bf838392 pcbnew: Allow arc editing via midpoint
This permits changing the radius of the arc by adjusting the center
point of the arc.  The arc end points are fixed in this operation.
2019-04-07 06:50:25 -07:00
Jeff Young 77284e82c8 Replace switch-to-non-copper-layer for DIMENSION and POLYGON.
These still aren't handled by DRC.

Fixes: lp:1796500
* https://bugs.launchpad.net/kicad/+bug/1796500
2019-04-03 19:14:45 +01:00
Jeff Young 920d9e3d46 Don't switch to non-copper layer when drawing text & graphics.
We now allow these items on copper layers (and do the necessary
DRC, etc.)

Fixes: lp:1796500
* https://bugs.launchpad.net/kicad/+bug/1796500
2019-04-03 10:18:11 +01:00
Seth Hillbrand 7ee12d674e pcbnew: Clear items before deleting vertex
Reverting changes causes the item to become invalid.  This can cause
issues when we have dangling pointers for the VIEW routines left over.
Until we implement a method of passing the reverted element back up to
the calling routine, we need to remove the selection for each Revert()
call.

Fixes: lp:1821909
* https://bugs.launchpad.net/kicad/+bug/1821909
2019-04-02 13:15:10 -07:00
Seth Hillbrand 940aef77af pcbnew: Update points before refresh
When removing a point from the polygon, the vertex is removed before it
is tested for validity.  If it fails validation, the edit is reverted
and the point count doesn't change, so the view update only modifies the
existing points.  But the revert may also have changed the shared
pointer to the point array, invalidating the view's copy.

Fixes: lp:1821909
* https://bugs.launchpad.net/kicad/+bug/1821909
2019-04-02 09:55:28 -07:00
jean-pierre charras b558366a4e Pcbnew: disable commit 3692c511 on non Windows platforms
A zone refill display progress bar is shown when deselecting the zone after geometry changes.
However, on Linux, there are some artifact between the progress bar refresh and the board view refresh:
the filled areas are incorrectly shown: the insulated islands remain displayed,
although they are removed from the actual filled areas list
So it is disabled until a fix is found.
2019-03-17 08:31:00 +01:00
jean-pierre charras 353d9d7c9e Pcbnew, Zone refill: avoid useless refilling, when zone parameters are not modified.
Previously, in many cases the selected zone was refilled on exit selection, even if the zone was not modified.
This is annoying, because the zone fill can be really time consuming, and cannot be called without a good reason.
Now the refilling is made only if a zone parameter is actually modified.
2019-03-14 17:33:25 +01:00
jean-pierre charras 3692c511d0 Zone fill: display progress bar when refilling a zone after edition.
Previously, refilling a zone after edition was made silently,
thus creating not understandable but very noticeable freeze time for complex zones.
2019-03-14 10:18:50 +01:00
jean-pierre charras 26acd39129 Fix a few Coverity warnings. 2019-03-07 20:01:47 +01:00
Seth Hillbrand 3dfa57fe1d pcbnew: Clear highlight cross-probe
When highlighting a new net, clear the Eeschema highlight before
selecting items

Fixes: lp:1815147
* https://bugs.launchpad.net/kicad/+bug/1815147
2019-03-04 12:00:59 -08:00
Seth Hillbrand 1be759c5c1 pcbnew: Force rotation to grid
When setting the modification point of a group, we get the grid-snapped
coordinate

Fixes: lp:1674835
* https://bugs.launchpad.net/kicad/+bug/1674835
2019-02-23 14:48:12 -08:00
Seth Hillbrand 1f7022cb64 pcbnew: Do not source highlight from non-copper pads
Highlight connections is meant to show the copper connections on a
board.  We remove the non-copper pads from our selection when attempting
to source the net for highlighting.

Fixes: lp:1815898
* https://bugs.launchpad.net/kicad/+bug/1815898
2019-02-14 15:20:49 -08:00
jean-pierre charras e6a200b09e Pcbnew: avoid integer overflow when displaying local coordinates.
Minor cleanup in code.
2019-02-14 10:57:22 +01:00
Seth Hillbrand b461fc44ef pcbnew: Ensure source snapping
Choosing the drag origin should not be dependent on the snap settings in
pcbnew.  Snap settings are sensible when you are designating a target
only.  Additionally, when dragging a module, we do not want the
footprint's pads to be used as targets for snapping.

Fixes: lp:1814402
* https://bugs.launchpad.net/kicad/+bug/1814402
2019-02-03 04:23:24 +01:00
Seth Hillbrand 05483a06c6 pcbnew: Re-attach snap options
Snapping to item options were partially disconnected when unifying
framework.  This re-attaches the options and adds the additional option
for graphical items.

Fixes: lp:1801377
* https://bugs.launchpad.net/kicad/+bug/1801377
2019-01-29 13:36:17 -08:00
Seth Hillbrand 184711beb4 pcbnew: Fix via snapping to multiple tracks
Rather than selecting an arbitrary track to snap, we select the closest
track to our point, allowing the via to be placed along the full track
length.

Fixes: lp:1813324
* https://bugs.launchpad.net/kicad/+bug/1813324
2019-01-25 09:13:18 -08:00
Seth Hillbrand 4247e32cd6 pcbnew: Disallow new via where DRC is violated
Prior to placing the via, we check if the resulting via will pass too
close to different nets on different layers.

Fixes: lp:1718827
* https://bugs.launchpad.net/kicad/+bug/1718827
2019-01-23 10:20:59 -08:00
Seth Hillbrand efe880bb79 pcbnew: Fix zone cutout duplication
When creating the zone cutout, we delete the old zone and add a new one
with each cutout.  This requires resetting the source zone and clearing
our previous selection if we would like to continue using the cutout
tool on the new zone.

Fixes: lp:1812339
* https://bugs.launchpad.net/kicad/+bug/1812339
2019-01-23 06:42:07 -08:00
Seth Hillbrand 7551613826 pcbnew: Don't duplicate TOOL_EVENT
There is some odd interaction in the default copy constructor for
TOOL_EVENT using boost::optional under gcc.  Avoid this by explicitly
constructing the event needed for cut

Fixes: lp:1812848
* https://bugs.launchpad.net/kicad/+bug/1812848
2019-01-22 08:36:56 -08:00
jean-pierre charras a1d1354bcc footprint_editor_tools.cpp: Better code in Placepad. 2019-01-21 21:33:37 +01:00
jean-pierre charras 4d88cd3a0a Footprint editor: add missing local coordinate initialization in Add Pad. 2019-01-21 21:03:36 +01:00
Seth Hillbrand 4cf4600a23 pcbnew: Discard delete action when routing
Prevent the action from being handled on the next transition.

Fixes: lp:1810611
* https://bugs.launchpad.net/kicad/+bug/1810611
2019-01-17 19:38:01 -08:00
Seth Hillbrand 5182fe15d3 Minor code formatting 2019-01-17 19:17:34 -08:00
Tomasz Włostowski 9657039af2 pcbnew: multiple fixes concerning track->pad net propagation used by Track/Via properties dialog:
- Added ignore netcode option to CONNECTIVITY_DATA::GetConnectedItems()
- PlaceModule() now ensures the module added to the board (and thus to the connectivity database) has correct bounding box necessary for R-trees to work
- Use recursive connected pad search so that the new net is propagated to all pads

Fixes: lp:1787961
* https://bugs.launchpad.net/kicad/+bug/1787961
2019-01-18 02:53:29 +01:00
Seth Hillbrand 8b5127d9bc modedit: Renumber pads should hold removed numbers
When renumbering pads, you can click on a pad the second time to restore
the pad to its original value.  This did not allow a user to then place
the removed number on the correct pad (assuming a mistake).  This commit
ensures that removed pad numbers are remembered and allow the user to
place in the correct pad.
2019-01-17 09:58:22 -08:00
Seth Hillbrand 6b1b4bb43a pcbnew: Add cursor help to renumber pads
Renumber pads command is abstruse so add a small popup help to guide
users when renumbering.
2019-01-17 09:58:22 -08:00
jean-pierre charras 1c4b0337c2 Footprint editor, GAL mode: add missing initialization of local coordinates when creating graphic items
Fixes: lp:1812233
https://bugs.launchpad.net/kicad/+bug/1812233
2019-01-17 17:59:00 +01:00
Seth Hillbrand e270b5d266 modedit: Mirror custom pads
Fixes mirror command to correctly handle custom pads.

Fixes: lp:1808135
* https://bugs.launchpad.net/kicad/+bug/1808135
2019-01-17 08:55:59 -08: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 0f1a11ef38 pcbnew: Cut only copied objects
Fixes a bug where objects where accessed after being freed by the cut

Fixes: lp:1811456
* https://bugs.launchpad.net/kicad/+bug/1811456
2019-01-11 17:27:29 -08:00
Seth Hillbrand d1b53028a1 Remove errant printf() debugging statement 2019-01-08 17:21:05 -08:00
Seth Hillbrand 994be43782 ratsnest: Calculate ratsnest per pad
The local/dynamic ratsnest needs to calculate on a per-pad basis as the
module is always listed as having a visible ratsnest.  This fixes the
finalized ratsnest viewed when routing as well as the show local
ratsnest regression.

Fixes: lp:1811010
* https://bugs.launchpad.net/kicad/+bug/1811010
2019-01-08 17:19:30 -08:00
Seth Hillbrand b0da1e19ee pcbnew: Don't use frame refresh to update display
Frame refresh in wxWidgets sets the focus back to indeterminate state
and prevents hotkey action until the focus is captured again.  Using
canvas update is the correct method to update the canvas display after
modifying zones/similar

Fixes: lp:1810993
* https://bugs.launchpad.net/kicad/+bug/1810993
2019-01-08 12:38:27 -08: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 aeedb3543b pcbnew: Update strings
Moving pcbnew error strings that may be seen by the user to translated
strings.  Strings that denote unexpected cases are moved to debug logs
as they are essentially asserts that should never be shown.  The
exceptions are the messages shown when files are loaded.  All unknown
items should show an error here.
2019-01-02 14:43:55 -08:00
Seth Hillbrand 5c055f3f80 pcbnew: minor text fix 2019-01-02 12:28:09 -08:00
Seth Hillbrand daee58a0ab pcbnew: Do not show dynamic ratsnest after most mods
Marking the selection modified should not show the local ratsnest unless
we are currently dragging

Fixes: lp:1809921
* https://bugs.launchpad.net/kicad/+bug/1809921
2019-01-02 12:27:48 -08:00
Seth Hillbrand 583e0173b9 pcbnew: Fix ratsnest display
Checks for ratsnest enabled prior to calculating and displaying the
local/dynamic ratsnest.  Calls the ratsnest clear from selection clear

Notably, it appears that the tool actions do not chain transitions for
the same event.  So only a single action (first specified) will be
executed when an event fires unless the actions are executed by separate
tools.

Fixes: lp:1809752
* https://bugs.launchpad.net/kicad/+bug/1809752
2019-01-02 11:56:23 -08:00
Tomasz Włostowski c777eac000 eeschema: improved highlighting of PCB->SCH cross-probed components/labels/pins
Fixes: lp:1796990
* https://bugs.launchpad.net/kicad/+bug/1796990
2018-12-24 15:35:25 +01:00
Seth Hillbrand 7e9fee285f pcbnew: Align/Distribute handle locking
This fixes the handling of align/distribute tool when called on locked
items.  Locked items cannot be moved but they may be used for the target
of an align/distribute operation.

Fixes: lp:1808238
* https://bugs.launchpad.net/kicad/+bug/1808238
2018-12-14 16:04:07 -08:00
Seth Hillbrand 0a26388901 pcbnew: Break track in edit mode
Enables the ability to break a track into two segments when operating in
the edit mode rather than in router.

Fixes: lp:1779788
* https://bugs.launchpad.net/kicad/+bug/1779788
2018-12-14 09:59:25 -08:00
Seth Hillbrand 77163e27f0 suppress boost optional compiler warning 2018-12-13 12:43:29 -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
jean-pierre charras 5f4530493a Make DRC markers always selectable.
Fixes: lp:1808181
https://bugs.launchpad.net/kicad/+bug/1808181
2018-12-13 09:06:38 +01:00
Seth Hillbrand 4ff9d2f5e4 pcbnew: Update Alt Delete Name/hint
Simply calling it Alternative Delete was hiding its behavior. This gives
a descriptive tooltip and command name allowing users to more easily
find the equivalent to the "Ripup" command
2018-12-12 17:23:27 -08:00
jean-pierre charras 85775d522c Fix incorrect include paths
Especially, pcbnew/import_dxf is no longer in use.
2018-12-11 11:32:58 +01:00
Seth Hillbrand d3a67e255d pcbnew: Polygon tool on EdgeCuts adds polylines
Edge cuts are more easily edited when they are polylines not polygons
and this keeps the files backwards compatible with v5.0.x.
2018-12-10 06:10:57 -08:00
Seth Hillbrand 7ed1968f60 pcbnew: Remove corners from graphical polygons
Cherry-picked item from 5.0 allowed this action for modedit but missed
pcbnew.  This allows the same action in pcbnew as well.
2018-12-09 08:14:45 -08:00
Seth Hillbrand 4fc81bb923 pcbnew: Graphic lines snap as single segments
Graphic lines and polygons are drawn to fit specific areas for which it
is helpful to have the endpoint controlled by the cursor even when
constraining the angle.

Fixes: lp:1805502
* https://bugs.launchpad.net/kicad/+bug/1805502
2018-12-08 07:26:58 -08:00
Seth Hillbrand 3d98c82217 pcbnew: Disable capture cursor in measure tool
When starting the measure tool, the cursor should not be captured until
we begin the measurement.

Fixes: lp:1806486
* https://bugs.launchpad.net/kicad/+bug/1806486
2018-12-05 19:59:01 -08:00
jean-pierre charras cc0aa8b928 Gfx import: fix many issues, and add many enhancements.
* Do not compile dxf old files.
* import gfx, gal mode: make absolute placement working.
* Import gfx in legacy canvas: use it and make interactive placement working
* Take imported line width in account. Ensure DXF line thickness is OK.
* handling empty files in legacy mode.
2018-12-03 15:25:44 +01:00
jean-pierre charras 430c61822d Import svg import code from experimental trunk: convert dxf importer 2018-12-03 13:42:23 +01:00
jean-pierre charras 74a9d5401a Import svg import code from experimental trunk: start point 2018-12-03 13:42:22 +01:00
Wayne Stambaugh 59b0f553e0 Code cleaning. 2018-11-28 09:58:41 -05:00
Seth Hillbrand 4a0467bbd0 Selection: allow optional locked item edit
When looping main, we should not exclude locked items without prompting
the user first.

Fixes: lp:1804979
* https://bugs.launchpad.net/kicad/+bug/1804979
2018-11-25 11:54:29 -08:00
Seth Hillbrand 2cfcb2b9fb SELECTION: Allow RequestSelection() to add items
The client filter might add items in the case where locked pads are
filtered.  We need to handle this case when requesting selection by
adding new items to the m_selection

Fixes: lp:1802686
* https://bugs.launchpad.net/kicad/+bug/1802686
2018-11-25 08:33:49 -08:00
Seth Hillbrand 908c2a37e5 GRID_HELPER: Finish drawing closed path
When we draw a path, we usually want to close the path when clicking on
the end of another line.  This uses grid helper to ensure this
progression happens as expected.
2018-11-24 08:00:11 -08:00
Seth Hillbrand 9955d0beb2 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

(cherry picked from commit 50eedcf0b3)
2018-11-23 11:45:29 -08:00
Seth Hillbrand ad9916a93d 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

(cherry picked from commit c0d9b9ab81)
2018-11-20 20:49:18 -08:00
Jeff Young 5bb5aea936 Don't leave a selection with a deleted item in it.
Fixes: lp:1803730
* https://bugs.launchpad.net/kicad/+bug/1803730
2018-11-19 16:03:30 +00:00