Skip to content
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
Closed

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

bfod opened this issue Jun 15, 2016 · 9 comments
Assignees
Labels
bug Broken behavior. macos macOS specific issue. windows Windows specific issue.
Milestone

Comments

@bfod
Copy link

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 Broken behavior. macos macOS specific issue. labels Jun 15, 2016
@bjorn
Copy link
Member

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
Copy link

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
Copy link
Member

bjorn commented Oct 25, 2016

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

@pouwelsjochem
Copy link

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
Copy link
Member

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
Copy link

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
Copy link

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
Copy link
Member

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 Windows specific issue. label Mar 2, 2017
@bjorn
Copy link
Member

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 as completed in 7dd81fc Mar 15, 2017
arcrowel pushed a commit to kpresler/tiled that referenced this issue Mar 22, 2017
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 mapeditor#1305
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broken behavior. macos macOS specific issue. windows Windows specific issue.
Projects
None yet
Development

No branches or pull requests

4 participants