Commit Graph

275 Commits

Author SHA1 Message Date
Jeff Young 9e9946628a Go back to arrow cursor on a cancel (or finish).
Fixes https://gitlab.com/kicad/code/kicad/issues/6421
2020-11-19 20:09:28 +00:00
Dominik Wernberger 99da663e82 Remove unused variables plus some more fixes from CppCheck
Remove unused variables plus a few more fixes from CppCheck

Remove unused variables plus a few more fixes from CppCheck
2020-11-19 02:28:47 +00:00
Jeff Young 795e45836d Fix assert in DRC. 2020-11-17 17:41:57 +00:00
Jeff Young 7bd31d5237 Naming conventions. 2020-11-14 18:26:03 +00:00
Jeff Young bdbb68f813 MODULE -> FOOTPRINT. 2020-11-13 16:04:03 +00:00
Jeff Young 3451ac3088 PCB_MODULE_T -> PCB_FOOTPRINT_T 2020-11-13 15:16:24 +00:00
Jeff Young f5443de7f9 D_PAD -> PAD. 2020-11-13 15:16:24 +00:00
Jeff Young 84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Jeff Young f7333ad64a Update some classnames including archaic zone names. 2020-11-12 10:31:25 +00:00
Jeff Young bd63c018c9 Don't snap synthetic priming event.
We need to let the consumer of the event do snapping (so that, for
instance, it can also snap to tracks, pads, etc.)

Fixes https://gitlab.com/kicad/code/kicad/issues/4365
2020-11-09 17:21:47 +00:00
Jeff Young 81ea71fb80 More safety when fetching via sizes. 2020-11-07 18:50:30 +00:00
Jeff Young ae9afdd169 SNR. (Mostly for progammers, but a little for user messages.) 2020-11-02 16:20:00 +00:00
Jeff Young a95e2184da A more generic error message when route start pt violates DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/1812
2020-11-01 18:23:07 +00:00
jean-pierre charras d6f91c810f Fix a few compil and Coverity warnings. 2020-10-25 10:02:07 +01:00
Seth Hillbrand 4085757aeb Remove beginning/ending spaces in translations
Adding space padding makes translations more difficult by increasing
string counts
2020-10-20 12:08:04 -07:00
Jeff Young 23d9e2e74a New rules engine needs non-connected items as well. 2020-10-17 13:52:18 +01:00
Jeff Young 1ee3df61c9 Improve robustness of infobar button handling. 2020-10-16 17:07:59 +01:00
Jeff Young eea7957e16 Inform user of bad DRC rules when filling zones.
ADDED: facility for hypertext links in infobar.

Also made use of this for via constraint errors when routing.

Fixes https://gitlab.com/kicad/code/kicad/issues/5800
2020-10-16 12:44:20 +01:00
Jon Evans cea73fe510 Restore net highlighting to router tool
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5962
2020-10-13 20:30:38 -04:00
Michael Kavanagh c40483d18a Cleanup: Move KiCad files into plugins folder 2020-10-12 16:36:08 +00:00
Jeff Young b92cb5c930 Hook up PNS via command to new rule system.
Fixes https://gitlab.com/kicad/code/kicad/issues/5951
2020-10-12 00:14:32 +01:00
Jeff Young 04c4012ee6 Make track/via sizes UI more predictable and compatible with DRC.
Two main changes: netclass values need to go through the DRC engine
so they can interact with other rules.  They're also now dependent
on the layer being routed as well as the start object.

Also make the controls adjust to each other better.  For instance,
copy-track-width needs to turn off when you select a particular
track width, and a particular track width needs to zero out when
you choose copy-track-width.

Fixes https://gitlab.com/kicad/code/kicad/issues/5951
2020-10-10 19:32:30 +01:00
Jeff Young b31470012a Previous check didn't account for router dragging. 2020-10-09 14:30:55 +01:00
Jeff Young 1cb0cbff2e Fix crash when router gets notifed but has no current m_placer.
Fixes https://gitlab.com/kicad/code/kicad/issues/5935
2020-10-09 14:26:04 +01:00
Tomasz Wlostowski 38cef95da9 router: initial support for V6 Design Rules (width/clearance/diff pair width/diff pair gap). Still a lot of work to do! 2020-10-09 00:01:26 +02:00
Marek Roszko f5e0754f65 Use the setCursor lambda pattern and fix up the initial cursor states 2020-10-07 23:26:14 -04:00
Mark Roszko d9485129c8 Implement more context specific cursors using both stock and custom cursors. 2020-10-08 00:50:28 +00:00
Jeff Young 35fa857fd8 Make sure router tool passes events it doesn't handle.
Fixes undo/redo when router tool is active but not routing.
2020-10-05 23:16:37 +01:00
Jeff Young 37906511f5 Class renaming.
DRAWSEGMENT  -> PCB_SHAPE
EDGE_MODULE  -> FP_SHAPE
TEXTE_PCB    -> PCB_TEXT
TEXTE_MODULE -> FP_TEXT
2020-10-05 11:55:33 +01:00
Jeff Young 7a4900b8dc PCB_LINE_T -> PCB_SHAPE_T and PCB_MODULE_EDGE_T -> PCB_FP_SHAPE_T
Also updated footprint text and zone types for consistencey.
2020-10-04 16:49:04 +01:00
Mikolaj Wielgus 400c15b8eb Add mils to units, remove useMils variables 2020-10-03 20:06:56 +00:00
Jon Evans 6f54a9982c Remove PCB_LAYER_WIDGET 2020-09-30 19:12:26 -04:00
PJM 258d1a1971 Pcb: Get proper "Break Track" location when invoked from RMB context menu
When invoking "Break Track" from the RMB context menu, Pcbnew
gets and uses the current position of the mouse to figure out where to
break the track.  The problem is that the mouse has to be moved to select
the "Break Track" menu item, and the mouse position used is wrong.  This
can result in the break in the wrong location or not happening at all.

CHANGED: This commit determines if the "Break Track" was invoked from a
context menu or a hotkey.  If a hotkey, it uses the current mosue position.
If a context menu, it uses the original postion of the mouse when the menu
was opened.
2020-09-28 16:56:02 +00:00
Ian McInerney bba29a1036 Always show the track and via menu in the router context menu 2020-09-25 00:17:54 +01:00
Ian McInerney 672756a018 Move the router tools to a TOOL_MENU context menu
The previous way of displaying a context menu was being
usurped by the selection tool because it was displaying its
menu before DispatchContextMenu was called, and all other tools
explictly use the TOOL_MENU system.

Fixes https://gitlab.com/kicad/code/kicad/issues/5762
2020-09-24 23:51:34 +01:00
Jeff Young ece2ae9805 Don't capture commands in the router eventloop that it doesn't process.
Fixes https://gitlab.com/kicad/code/kicad/issues/5692
2020-09-19 12:08:18 +01:00
Jeff Young 88635ee5b6 Clean up error messages.
Convert a lot of nags to InfoBar errors/warnings/messages, and some
that never should have been exposed to wxFAIL_MSGs.
2020-08-31 14:19:57 +01:00
Jeff Young 8b7c0cbe04 Adjust footprint zones while dragging footprint. 2020-08-28 11:05:58 +01:00
Jeff Young 57c3d8e8d8 Make sure preview group gets added to view after a clear. 2020-08-15 21:13:44 +01:00
Jon Evans bd14f8a82a ADDED: New appearance control widget for PcbNew
Featuring:
- Layer view presets
- Per-type opacity for tracks, vias, pads, zones
- Net and netclass color and visibility controls

CHANGED: Simplified object visibilty controls

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1951
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1981
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2003
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2173
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2254
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4325
2020-08-15 15:24:28 -04:00
Jeff Young 73832a9708 Work around an event processing failure.
Fixes https://gitlab.com/kicad/code/kicad/issues/4273
2020-08-05 19:36:58 +01:00
Jeff Young e2ec9d9f00 A more fail-safe way to disallow editing while routing.
Fixes https://gitlab.com/kicad/code/kicad/issues/4413

Fixes https://gitlab.com/kicad/code/kicad/issues/5067
2020-08-05 16:51:58 +01:00
Jeff Young 59ba793096 Disable various combinations of router and editing commands.
They just confuse each other.

Fixes https://gitlab.com/kicad/code/kicad/issues/5067
2020-08-04 14:32:02 +01:00
Jeff Young 74b9cce682 Try again at dragging module edges.
Fixes https://gitlab.com/kicad/code/kicad/issues/5037
2020-08-03 23:53:45 +01:00
Jeff Young ef2388b5bb Fix issue with dragging flipped MODULE. 2020-08-02 17:05:13 +01:00
Jeff Young d586495c0a Preview fp edges & text while dragging in router.
Fixes https://gitlab.com/kicad/code/kicad/issues/5037
2020-08-01 15:40:34 +01:00
Tomasz Wlostowski 70b98c3b49 router: dump entire event log + annotated PCB upon user request 2020-07-22 18:05:54 +02:00
Tomasz Wlostowski 379aa8f3b5 router: clearer distinction between LOGGER and DEBUG_DECORATOR classes.
The first one keeps a log of events (start routing, mouse motion, etc).
The second allows for adding temporary debug drawings and messages which are stored synchronously with the events in LOGGER.

The event stream together with the PCB design (now with UUIDs) can be used to deterministically replay routing bugs as the user sees them.
2020-07-22 18:05:54 +02:00
Jon Evans 2f31bf278b Fix layer hotkey dispatch
Hotkeys received by more than one tool need AF_NOTIFY
2020-07-11 21:59:16 -04:00
Jon Evans 0148c1db84 Support layer switch hotkeys while routing
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4699
2020-07-03 19:49:19 -04:00