scrollwheel zooming with button pressed, offset not calculated on scroll event

Bug #1260995 reported by Cojnel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

In v0.48.4 r9939,
it's possible to zoom in and out with the scrollwheel
while drawing/moving a shape/path or rotating a guide.

It helps with precision when positioning an object while it's being drawn or moved (scaling and rotating objects or moving guides doesn't work currently).

Problem:
As one scrolls to zoom in and out,
the object being drawn/moved sometimes shifts away from the cursor,
and when the cursor is moved (a mouse drag event),
the object returns to where the mouse was pressed on it.

Solution:
It is caused by the offset distance between the mouse coordinates and the bottom left corner of the page only gets calculated when the mouse is pressed, it should also be calculated in the scroll event code, if a button is pressed and the scroll wheel is turned.

Reproduce:
preferences > scrolling > [checked] mouse wheel zooms by default

Zooming with the middle mouse button pressed:
(it's probably not done very often but it demonstrates the offset problem)
1. move the cursor to the top right corner of the page
2. hold down the middle mouse button (the scroll wheel)
3. try not to move the mouse and turn the scrollwheel,
if the mouse wasn't moved while scrolling (it's not easy, 1px is enough),
then the page zooms normally.
4. now move the mouse (the offset is updated on mouse drag),
and the page snaps to maintain the same distance between the mouse and bottom left corner of the page.

Drawing a shape:
1. choose the rectangle tool
2. hold down the left mouse button to start drawing a rectangle
3. move the cursor so that the rectangle has some width and height
4. scroll the mouse wheel to zoom in and out (it does not have to be done quickly)
5. the corner of the rectangle that is under the cursor sometimes shifts away from the cursor
6. if the mouse isn't moved (not easy) and one keeps zooming in and out
then the drawing corner of the rectangle stays shifted from the cursor
7. now move the cursor, the rectangles corner snaps back under the cursor.

Moving a node:
1. choose the bezier path tool
2. draw 2 nodes on the page
3. choose the edit paths and nodes tool
4. hold down the left mouse button on one of the nodes and move it slightly.
5. scroll up, the second node becomes selected,
6. move the mouse, the second node shifts to the bottom left corner, the path between them shows the offset distance between the mouse and bottom left corner that was set when the first node was moved slightly.

This zooming feature seams to have been removed in the development versions iv'e tried since r12830, maybe it was removed because of the offset problem.

tested on linux mint 15 cinnamon 32bit

Tags: ui zoom
Revision history for this message
Cojnel (cojnel) wrote :
Revision history for this message
Cojnel (cojnel) wrote :
Revision history for this message
su_v (suv-lp) wrote :

> Moving a node:
> (…)
> 5. scroll up, the second node becomes selected,
> (…)
> "node drag zooming, snaps to bottom left corner.gif"

This is not invoking zoom: scrolling the mouse wheel in this context triggers a special selection mode:
«Nodes can also be added to or removed from the selection by hovering the cursor over a node and using the Mouse Wheel, moving “up” to add nodes and “down” to remove nodes. The Page Up and Page Down keys can be used in place of the Mouse Wheel (broken on v0.48, fixed in v0.48.1). This selection technique is especially useful in conjunction with node sculpting.

Two modes are possible: The default mode adds nodes based on the spatial distance from the cursor. If the Ctrl key is held down, the nodes are selected based on the linear distance measured along the path (swapped in v0.48, fixed in v0.48.1). In this latter case, only nodes in the same sub-path can be selected. »
<http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Paths-Editing.html#Paths-Node-Selecting>

AFAICT in current trunk adding/removing nodes from the selection while having LMB button pressed is no longer supported (issue 'Moving a node' reproduced with rev <= 12563, not reproduced with rev >= 12570, independent of the preference setting for scrolling with mouse wheel).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.