Dragging using highlight caused an assertion as the duplicated lines
were being re-added with their old links still inplace. While this was
probably fine as the link references shouldn't be stale, we clear them
to allow for the possibibility that the dragger will adjust the links in
the future.
Drag is used for multiple modes so should be initialized when starting.
The line that we generate however needs to be pristine in drag, so we
clear the links in the duplicate.
Fixes: lp:1839612
* https://bugs.launchpad.net/kicad/+bug/1839612
m_dragstatus is set to true when a valid route is created given the
user's constraints. We need to check this before committing the route
to the board.
Fixes: lp:1794810
* https://bugs.launchpad.net/kicad/+bug/1794810
Previously, dragging changes were applied only if the last cursor move
finished with a successful drag operation. It made items squeezing
difficult, as it required accurate cursor movement to apply the changes.
add overloads for NODE::Add( ... ) taking pointers to specific item types (retain old private add-Functions, they will come in handy later)
LINE overloads now take by reference, to document their special treatment.
updated code throughout affected by these changes
- PNS_ITEMSET now keeps ownership info (does not rely on PNS_ITEM::Owner(), avoiding the risk of dangling pointers)
- fixed vias losing connected traces when dragging in mark obstacles mode
- fixed rare segfault when board item returned null netclass
- re-worked PNS_LINE_PLACER and PNS_ROUTER classes a bit, removing duplicate class members
- cleaned up Andrew's blind/buried via fixes
- fixed 'custom via width' dialog bug updating the width even when closed/cancelled
- fixed incorrect radius of drawn microvias