Undo with the line tool sometimes switches to wrong node
Bug #699203 reported by
KaiMartin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gEDA project |
New
|
Medium
|
Unassigned | ||
pcb |
New
|
Medium
|
Unassigned |
Bug Description
Undo with the line tool will under certain circumstances
choose the wrong node to start the next line segment.
How to reproduce:
1) set grid to 100 mil
2) select the line tool
3) draw a three node triangle:
(100/100) to (100/200) to (200/200) to (100/100)
4) press [u] to undo the last segment
5) the next segment will start at (100/100) rather than (100/200)
---<(kaimartin)>---
Changed in geda-project: | |
importance: | Undecided → Medium |
To post a comment you must log in.
I've figured out why the specific case listed happens. The restored origin isn't retrieved from the undo, it's guessed from the origin of the current line and the remaining board. If you "cross the streams" the nature of the search seems to find the older line every time. The obvious way to fix that is to get the point out of the undo information -- there's just no good way to pass that around at the moment. I suppose the Crosshair attach state could be added as an undo type, that might be nice and clean. The catch is that if you've passed out of line mode, the crosshair info should not be restored.
There's a more annoying version of this problem, though, which is probably due to straight line segments being extended by line drawing and then re-chopped by the undo (which removes the combined segment and restores the partial segment). The undo restores the line, but lost the FOUNDFLAG. If you're in auto-drc, you can't actually draw off the end of the line. I am going to commit a fix for that.