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
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.
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
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.
Not all footprint pad items are connected to elements in the PNS, so if
we don't find the parent element, we avoid later crashes/assertions by
skipping their addition
Fixes#3972 | https://gitlab.com/kicad/code/kicad/issues/3972
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme
Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
Calling Init() in an action routine will reset the router
settings to the state they were in when first starting pcbnew.
The Init() function is automatically called when the tool is created.
Fixes: lp:1843810
* https://bugs.launchpad.net/kicad/+bug/1843810
Before, if the tools were activated from the context menu,
they would start drawing where the menu item was selected
instead of where the menu was opened.
The problem is that wxEVT_CHAR_HOOK doesn’t do the key translation
properly. wxEVT_CHAR does, but we only get to that if we skip the
event at the end of the tool’s event processing loop, which most tools
don’t do. (Selection tools, point editors, pickers, and a couple of
others do skip, which is probably why this didn’t get reported earlier.)
I played around with a couple of ways to fix wxEVT_CHAR_HOOK. Most of
them don’t work, and the few egregious hacks I tried weren't cross-
platform.
So I’m changing it so that most tools now skip at the end of their
event loops. I left out a couple that I felt were high risk (length
tuning, for instance). But there’s still enough risk that I’m 100%
sure it will break something, I just haven’t a clue what.
Fixes: lp:1836903
* https://bugs.launchpad.net/kicad/+bug/1836903
Includes the addition of an onSetCursor() handler which must be called
from both the GAL canvas AND the GAL backend (at least on OSX) to prevent
cursor flickering between (for instance) pencil and arrow.
Also includes new architecture for point editors which allows them to
coordiate cursors with the editing tools (so we can switch to an arrow
when over a point).
We were running into various corner conditions where a tool's event
loop would exit while the tool was still active, or the tool would
get popped while we were still in the event loop. (A lot of these
had to do with the POINT_EDITOR's, but not all of them.)
The new architecture:
1) tools always do a Push()/Pop()
2) everyone is responsible for their own pops; no more stack-clearing
on a cancel
3) CancelInteractive events go to all tools to facilitate (2)
It's a bit of a hack because they're statically initialized and
so we can't make use of the _() macro. We do still want it in the
code, however, because the string harvesting is based off of it.
Fixes: lp:1833000
* https://bugs.launchpad.net/kicad/+bug/1833000
When dragging, you will seldom want to snap to the original item. This
commit prevents the "size of track" snap to the original item and
replaces it with an auxilary grid origin for the snap. This means
effectively that the snap will happen to grid for the original item
unless the cursor is closer to the original item line than it is to the
grid crossing.
Fixes: lp:1820248
* https://bugs.launchpad.net/kicad/+bug/1820248
The selection for interactive drag uses cursor position off grid to
choose the element for dragging. We pass the same value into the start
dragging routine to choose the correct end of the element.
Fixes: lp:1813665
* https://bugs.launchpad.net/kicad/+bug/1813665
When changing the track width, we need to allow that the track's route
will change based on DRC, so force a move without changing position.
Fixes: lp:1785057
* https://bugs.launchpad.net/kicad/+bug/1785057
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
After an action is completed that required the screen to pan when the
cursor reaches the edge of the screen, we should release the cursor to
allow the user to move their mouse without panning.
Fixes: lp:1763860
* https://bugs.launchpad.net/kicad/+bug/1763860
- Ordering of Hotkey list by function
- Use Hotkey assignment instead of hard-coded hotkey for length tuning
- Adjust default Length Tuning settings hotkey to CTRL-L so that we
don't overlap with "Lock" (overlaps are not editable)
Corrects an error in polyline estimation
Syncs graphics to world PNS by whole layer set rather than
individual layer at a time.
Prevents reloading of full pns TOOL_BASE during reset of tools unless
the tool is being activated.
Fixes: lp:1766626
* https://bugs.launchpad.net/kicad/+bug/1766626
Track dragging forces the cursor position, which is still kept when PNS
router is launched again. It is avoided by resetting the force cursor
position option before running the event loop.