New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinch to zoom no longer works on OSX, causing unwanted jump to 1% zoom #1305

Closed
bfod opened this Issue Jun 15, 2016 · 9 comments

Comments

Projects
None yet
4 participants
@bfod

bfod commented Jun 15, 2016

in .15 I could pinch-to-zoom in OSX, but in .16 if I pinch at all it jumps to 1% zoom and can't be zoomed back. That would be a non-fatal bug, except the pinch gesture is often detected in OSX so the display is often unwantedly jumping to 1% zoom.

@bjorn bjorn added bug macos labels Jun 15, 2016

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Jun 15, 2016

Owner

That's bad news. Unfortunately, I have no way to test this myself. :S

Since I don't think I changed anything related to this in Tiled 0.16, I fear it may be a Qt bug. I'll have to check which version of Qt Tiled 0.15 was built against to see if it could be a regression. Also, could you try if this still happens in the current snapshot, which is built against Qt 5.6?

https://update.mapeditor.org/snapshots-osx/

Owner

bjorn commented Jun 15, 2016

That's bad news. Unfortunately, I have no way to test this myself. :S

Since I don't think I changed anything related to this in Tiled 0.16, I fear it may be a Qt bug. I'll have to check which version of Qt Tiled 0.15 was built against to see if it could be a regression. Also, could you try if this still happens in the current snapshot, which is built against Qt 5.6?

https://update.mapeditor.org/snapshots-osx/

@pouwelsjochem

This comment has been minimized.

Show comment
Hide comment
@pouwelsjochem

pouwelsjochem Jun 16, 2016

Hi Bjorn,

I just had a look at the new OS X snapshot.. It's different :p It does not go to 1% anymore, but what happens now is the following:

200% zoom
pinching to zoom
It starts zooming, but get's pulled back again every frame or so, something like this happens (made up numbers): 200% -> 210% -> 201% -> 220% -> 203% -> 236% -> 206%
stopped pinching, zoom stopped at 206%
but expected zoom to be more like 250% or something

I hope this makes sense, if extra information is needed for debug I could record my screen.

pouwelsjochem commented Jun 16, 2016

Hi Bjorn,

I just had a look at the new OS X snapshot.. It's different :p It does not go to 1% anymore, but what happens now is the following:

200% zoom
pinching to zoom
It starts zooming, but get's pulled back again every frame or so, something like this happens (made up numbers): 200% -> 210% -> 201% -> 220% -> 203% -> 236% -> 206%
stopped pinching, zoom stopped at 206%
but expected zoom to be more like 250% or something

I hope this makes sense, if extra information is needed for debug I could record my screen.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Oct 25, 2016

Owner

Tiled 0.17 was released against Qt 5.7. Did that change anything regarding this issue?

Owner

bjorn commented Oct 25, 2016

Tiled 0.17 was released against Qt 5.7. Did that change anything regarding this issue?

@pouwelsjochem

This comment has been minimized.

Show comment
Hide comment
@pouwelsjochem

pouwelsjochem Dec 22, 2016

Hi, sorry for the late reply.
I am using Tiled 0.18 but the issue is still here.
Do you want me to make a screen recording?

pouwelsjochem commented Dec 22, 2016

Hi, sorry for the late reply.
I am using Tiled 0.18 but the issue is still here.
Do you want me to make a screen recording?

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Dec 22, 2016

Owner

@pouwelsjochem I'm sad to hear it's still there. A recording could be illustrative. Ultimately, I'm wondering how to reproduce this issue myself. I recently got a Wacom Intuos Pro and I wonder if I could reproduce it if connected to my Mac Mini.

Owner

bjorn commented Dec 22, 2016

@pouwelsjochem I'm sad to hear it's still there. A recording could be illustrative. Ultimately, I'm wondering how to reproduce this issue myself. I recently got a Wacom Intuos Pro and I wonder if I could reproduce it if connected to my Mac Mini.

@pouwelsjochem

This comment has been minimized.

Show comment
Hide comment
@pouwelsjochem

pouwelsjochem Dec 22, 2016

Ah alright, perhaps that will also result in the same bug. But for now, here's the video :)
Video

Explanation of what is happening:

  • I start off with a very slow 'pinch to zoom', which jumps back all the time
  • At around 0:06 I do a quick 'pinch to zoom', this does work
  • At around 0:10 I start doing the same as the first 2 steps but with zooming-out

pouwelsjochem commented Dec 22, 2016

Ah alright, perhaps that will also result in the same bug. But for now, here's the video :)
Video

Explanation of what is happening:

  • I start off with a very slow 'pinch to zoom', which jumps back all the time
  • At around 0:06 I do a quick 'pinch to zoom', this does work
  • At around 0:10 I start doing the same as the first 2 steps but with zooming-out

@bjorn bjorn added the bounty label Feb 23, 2017

@necrotek

This comment has been minimized.

Show comment
Hide comment
@necrotek

necrotek Mar 2, 2017

Pinch to zoom also does not work with windows 10 tablet mode Tiled v 0.18.2. I am not sure if this is a related issue so did not want to start a new topic. 2 finger swipe to move the map Does not work either. It moves the map but snaps back to the original location on release.

necrotek commented Mar 2, 2017

Pinch to zoom also does not work with windows 10 tablet mode Tiled v 0.18.2. I am not sure if this is a related issue so did not want to start a new topic. 2 finger swipe to move the map Does not work either. It moves the map but snaps back to the original location on release.

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Mar 2, 2017

Owner

@necrotek Ah, thanks for mentioning that. I think that should be possible for me to reproduce, and if I can fix that then we can see if it also fixes the problems on macOS

Owner

bjorn commented Mar 2, 2017

@necrotek Ah, thanks for mentioning that. I think that should be possible for me to reproduce, and if I can fix that then we can see if it also fixes the problems on macOS

@bjorn bjorn added this to the Tiled 1.0 milestone Mar 2, 2017

@bjorn bjorn added the windows label Mar 2, 2017

@bjorn bjorn added this to Tiled 1.0 in Roadmap Mar 2, 2017

@bjorn

This comment has been minimized.

Show comment
Hide comment
@bjorn

bjorn Mar 15, 2017

Owner

Alright, I can reproduce this also on my Mac Mini with an Intuos Wacom tablet. Will see if I can find an issue in the code.

Owner

bjorn commented Mar 15, 2017

Alright, I can reproduce this also on my Mac Mini with an Intuos Wacom tablet. Will see if I can find an issue in the code.

@bjorn bjorn self-assigned this Mar 15, 2017

@bjorn bjorn closed this in 7dd81fc Mar 15, 2017

@bjorn bjorn moved this from Tiled 1.0 to Recently Completed in Roadmap Mar 15, 2017

arcrowel added a commit to kpresler/tiled that referenced this issue Mar 22, 2017

Fixed handling of pinch gestures
While reading the API, it was clear that we should use totalScaleFactor
rather than scaleFactor since it was getting multiplied with the initial
scaling factor. For some reason, scaleFactor must have been returning
the totalScaleFactor in the past since the feature has been working
fine at some point.

I also noticed severe jittering of the view since it was getting
repainted twice, right after changing the scale and then again after
adjusting the scale origin. Fixed this by using AnchorUnderMouse, but
kept the origin correction since AnchorUnderMouse appears to be off by
one pixel per event, causing the view to shift slowly while pinching.

Closes #1305

@bjorn bjorn removed this from Recently Completed in Roadmap Jun 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment