It's easy to accidentally move whole zones (or lines, etc...) when you intend to move only one point
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
KiCad |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Application: kicad
Version: (2015-08-11 BZR 6084)-product release build
wxWidgets: Version 3.0.2 (debug,
Platform: Linux 4.0.0-2-amd64 x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.54.0
When a copper zone is selected and the mouse cursor approaches a zone corner, the crosshair nicely snaps to the corner. However, if you then attempt to drag the point by clicking the left mouse button, and moving the mouse, you often end up moving the whole zone instead of the point as you intended, if you move the mouse cursor a little too early, or too quickly.
The reason for this is that a drag event is only initiated after a certain time has passed after clicking a mouse button, or a certain distance has been traveled by the mouse. In the meantime, more mouse motion events are produced. These mouse motion events causes the point editing tool to update the point currently being edited, and since the mouse cursor has moved, it is no longer close enough to a zone corner when the actual drag event is received, resulting in the whole zone being moved instead of the corner (which the crosshair had nicely snapped to).
This issue affects all kinds of objects edited by the point editor, not only zones.
I have made an attempt at solving this issue in the attached patch.
The patch solves this problem by checking whether a point is located at the DragOrigin at the time of the drag event. I created separate function for updating the currently edited point, which looks for points at the event position for motion events, and at the drag origin for drag events. The function is not called after a drag has been initiated in the point tool.
With this patch, the corner which the crosshair has snapped to will always be moved, no matter how fast you move the mouse after pressing the left mouse button.
Changed in kicad: | |
status: | Fix Committed → Fix Released |
v2: Added spaces between parentheses in function declaration& definition.