Bug report #415
mouse-scroll zoom fails to center the view properly
Status: | Closed | ||
---|---|---|---|
Priority: | Low | ||
Assignee: | Gary Sherman | ||
Category: | GUI | ||
Affected QGIS version: | Regression?: | No | |
Operating System: | All | Easy fix?: | No |
Pull Request or Patch supplied: | Resolution: | fixed | |
Crashes QGIS or corrupts data: | Copied to github as #: | 10474 |
Description
1. add some vector
2. mouse-scroll zoom in once
3. mouse-scroll zoom out once
4. goto 2 until you see how your map wanders to one side of the Map View
This should not happen - zoom in once and then zoom out back should result in no change in what is displayed, yet it does.
Note the scale is restored properly, only the view center is not.
Maciek
History
#1 Updated by Martin Dobias about 18 years ago
This is not a bug, it's a feature :) ... map canvas is recentered on mouse position when using scroll wheel. I think this has been discussed some time ago on mailing list that some users think it's good and some users think it's bad.
I guess only way to satisfy both groups is to make this customizable.
#2 Updated by neteler-itc-it - about 18 years ago
Hi wonder,
also I consider this as a but. It's rendering the
mouse wheel zoom useless (with 1 "roll" back and forth
I no longer see my map but only a white area).
For me it would be fairly intuitive if mouse-scroll
zoom in/out once keeps me where I am.
Related question: how can I disable mouse wheel zoom
to avoid that I regularly get off-map just by
accidentially touching the mouse wheel?
thanks,
markus
#3 Updated by Martin Dobias about 18 years ago
Hi Markus,
actually we could have 3 options in global settings for what to do on scroll wheel event:
1. zoom
1. zoom and recenter
1. nothing
And first option can be default...
Martin
#4 Updated by Gary Sherman about 18 years ago
The behavior is pretty standard and used by other applications. I think making it a user setting with 3 options is the best solution.
#5 Updated by Redmine Admin about 18 years ago
Replying to [comment:1 wonder]:
This is not a bug, it's a feature :)
You missed the point of the bug report.
map canvas is recentered on mouse position when using scroll wheel.
I'm not complaining it is doing it. I'm complaining it is not doing it properly, as the title reads. Again, to reproduce:
1. add some vector
2. mouse-scroll zoom in once
3. mouse-scroll zoom out once
4. goto 2 until you see how your map wanders to one side of the Map View
Don't move your mouse between steps 2 and 3. Note the map wanders in the Map View at each iteration, while it shoudn't.
Was I clear this time?
Maciek
#6 Updated by Martin Dobias about 18 years ago
Replying to [comment:5 [email protected]]:
map canvas is recentered on mouse position when using scroll wheel.
I'm not complaining it is doing it. I'm complaining it is not doing it properly, as the title reads. Again, to reproduce:
1. add some vector
2. mouse-scroll zoom in once
3. mouse-scroll zoom out once
4. goto 2 until you see how your map wanders to one side of the Map View
Don't move your mouse between steps 2 and 3. Note the map wanders in the Map View at each iteration, while it shoudn't.
Then I really don't understand what do you think. At my opinion, it's done correctly (recenter and zoom). Take in account that although mouse pointer is on the same poisition, its map coordinates change on every zoom in/out. Thus it's natural that your map moves away quicky if you have your pointer off the center of map view.
What is your expectation how should it work?
Martin
#7 Updated by Gavin Macaulay - about 18 years ago
The behaviour of qgis on mouse scroll is working as intended (zoom and recenter on mouse position), but that behavour is not what everyone expects with a mouse scroll, and there appear to be 3 ways in which it could work.
With our desire to get 0.8 released as soon as possible, we are not terribly keen on adding new features to qgis until after 0.8 has been released. We are focussing on fixing things that cause crashes or are clearly not working as intended.
The suggestion has been made that the behaviour of qgis to a mouse zoom be made customisable to match the expectations of various users. This is sensible and is what I think we should do. However, it is an enhancement to qgis and as such should be marked against the 0.9 release.
#8 Updated by neteler-itc-it - about 18 years ago
The issue is about 'recenter'. Why is that needed? If I zoom in/out, the
center should remain the same. Maybe I am wrong on this...
Markus
#9 Updated by neteler-itc-it - about 18 years ago
Now I start to understand what happens: zoom and recenter on mouse position. So far the mouse position was random in my case and I got confused. So I would have to keep it precisely in the middle of the map to reach what I feel how it should work.
OK, confirmed.
But: For a human it's rather hard to estimate where the center of the map window is. So in most cases it will wander off (quickly).
Above Martin said:
actually we could have 3 options in global settings for what to do on scroll wheel event: 1. zoom 2. zoom and recenter 3. nothing And first option can be default...
This sounds like a perfect solution for Maciek and me (and maybe others): make the first option the default (please).
thanks,
markus
#10 Updated by Redmine Admin about 18 years ago
Replying to [comment:6 wonder]:
Replying to [comment:5 [email protected]]:
Don't move your mouse between steps 2 and 3. Note the map wanders in the Map View at each
iteration, while it shoudn't.Then I really don't understand what do you think. At my opinion, it's done correctly (recenter and zoom).
That's right. And I don't mind it.
Take in account that although mouse pointer is on the same poisition, its map coordinates change on every zoom in/out.
I don't agree. What I'm doing is zooming in and back, once, without moving my mouse. Given this, why should the map coordinates under the mouse cursor change?
Thus it's natural that your map moves away quicky if you have your pointer off the center of map view.
But I'm not moving my mouse pointer at all...
P.S.
A note regarding Markus's wish about changing the tool not to recenter, or letting the user choose his prefered behavior: that's a feature request, and although related, a separate issue. Please don't discuss it here, as it hampers the discussion clarity. Thanks.
#11 Updated by neteler-itc-it - about 18 years ago
Maciek wrote:
A note regarding Markus's wish about changing the tool not to recenter, or
letting the user choose his prefered behavior: that's a feature request,
and although related, a separate issue. Please don't discuss it here, as
it hampers the discussion clarity. Thanks.
... I disagree. If you keep the mouse in the middle of the map, it works
as expected by you (and me). So it's not a separate issue but exactly explaining
your problem (so also mine).
Anyway, I think it's clear now. I'll stop contributing to this discussion
since there is nothing else to say from my part. Will just watch what happens.
Best,
Markus
#12 Updated by Redmine Admin about 18 years ago
Replying to [comment:11 [email protected]]:
... I disagree. If you keep the mouse in the middle of the map, it works
as expected by you (and me). So it's not a separate issue but exactly explaining
your problem (so also mine).
Markus is correct. The reason of the fuss is that I assumed, in error, that the mouse pointer is centered in the display too, when the map is centered after a mouse-scroll zoom.
My wrong assumption came from the fact that I intuitevely moved the pointer to the map center myself, when I wanted to zoom out back. But, "For a human it's rather hard to estimate where the center of the map window is" (as Markus wrote on 12/02/06 21:26:10).
Of course I was not able to aim at the map center precisely, so I thought there was a bug, that the map is drifting because the mouse pointer is not centered properly for me (anybody still following; me hardly). Why I failed to notice that it is me trying to move the mouse pointer to the center I don't know.
Now, hoping that I know how the mouse scroll zoom works actually: could my assumption be implemented? So that when the map is centered after a mouse-scroll zoom, the mouse pointer moves along with the map, thus it is placed in the display center, but relative to the map - it remains at the same location. This would prevent the map from drifting further on at each subsequent mouse-scroll zoom.
I agree with Martin and Garry that it would be best to make this configurable, but I also agree with g_j_m that such a modification would be too intrusive for 0.8, and should be left for 0.9. But I guess that my suggestion wouldn't trigger a big modification, yet would improve usability. What do others think?
Best,
Maciek
#13 Updated by Gavin Macaulay - about 18 years ago
In general, moving the mouse pointer independently of the user is 'bad' in user interface terms. The mouse pointer belongs to the user and they expect to have full control over it. Having the mouse cursor jump around when zooming would be quite confusing to me (more so than having the map drift when zooming :)
Gavin
#14 Updated by Redmine Admin about 18 years ago
OK then. Re-assing the bug as you wish. Thanks.
Maciek
#15 Updated by Martin Dobias about 18 years ago
- Status changed from Open to Closed
- Resolution set to fixed
Let's keep everyone happy: fbc787fc (SVN r6178) makes this configurable and 'zoom only' option is default. I guess we can close this verbose discussion :-)
Martin
#16 Updated by Redmine Admin about 18 years ago
Martin,
Thanks a lot! I will try it out soon (too late today; you don't want me to "discover" another bug half sleeping, do you? ;) ).
Cheers,
Maciek
#17 Updated by neteler-itc-it - about 18 years ago
Martin,
another happy user! I compiled it and enjoy again the mouse wheel scrolling.
Thanks so much :)
Markus
#18 Updated by Anonymous over 15 years ago
Milestone Version 0.8 deleted