pencil icon indicating copy to clipboard operation
pencil copied to clipboard

Zoom shortcut not working with the mouse

Open scribblemaniac opened this issue 6 years ago • 8 comments

Issue Summary

The control+drag shortcut for zooming does not appear to be working for me.

Actual Results

Holding control and dragging with the left mouse button freezes the canvas cursor at point where the dragging started, and the canvas does not resize. The canvas cursor does not update until the first movement after release. Control+dragging with a tablet works correctly.

Expected Results

Holding control and dragging with the mouse should zoom the canvas in or out.

Steps to reproduce

  1. Hold control
  2. Left click and drag

System Information

  • Pencil2D Version: e4e7d1a871b93fd21e79d993884161274552b0d8 nightly build or v0.6.2 build from source

  • Operating System: macOS 10.13.6

  • RAM Size: 16 GB

  • Qt Version: 5.12.1


Technical Details

I'm assuming this is macOS only since @Jose-Moreno has been using this with the latest nightlies. After a little bit of testing, I have determined that ScribbleArea::mouseMoveEvent and ScribbleArea::mouseReleaseEvent are not getting called at all when the control button is held. ScribbleArea::mousePressEvent is called as expected. This could be because control+click has a default behavior on mac of opening the context menu.

The shortcut works with the v0.6.2 build, however it does not work when I build that tag manually, which suggests that this is almost certainly a Qt 5.12 issue.

scribblemaniac avatar Mar 09 '19 23:03 scribblemaniac

What you write @scribblemaniac, is that implicit that you have selected the hand-tool? Maybe it's a stupid question, but here, on Ubuntu, Ctrl-Drag only works when the hand tool is selected. I've never used that feature before. Didn't know it existed.

davidlamhauge avatar Mar 09 '19 23:03 davidlamhauge

@davidlamhauge No actually, it should work with all tools. I also just recently found out about it too. Have you tested with a version build with qt <5.12 (ex. the v0.6.2 build)?

scribblemaniac avatar Mar 09 '19 23:03 scribblemaniac

The plot thickens and the rabbit hole gets deeper. Indeed I'm not having such issues on Windows. Ctrl + MMB or RMB + Drag work as expected. Would have to test on Linux as well though considering David mentions that it's not working for him :weary:

Jose-Moreno avatar Mar 10 '19 01:03 Jose-Moreno

Hmm, actually Control+RMB works for me but not Control+LMB or MMB.

scribblemaniac avatar Mar 10 '19 01:03 scribblemaniac

If you have quick-sizing enabled Ctrl+LMB will forcefully try to change the feathering of any given tool. If it's disabled, it shouldn't work either or at least It never has for me; only MMB / RMB. Since I come from Blender land we use MMB for everything so I'm used to that; I never thought about what should be the correct key combination to use to be honest :thinking:

Jose-Moreno avatar Mar 10 '19 01:03 Jose-Moreno

After a good nights sleep, I've tested it again. It's Ubuntu 18.04, Qt Creator 4.8.2, based on Qt 5.12.1. Ctrl+LMB only works with the Hand tool selected. Ctrl+RMB works all the time. Ctrl+MMB works all the time, but in a buggy way. Sometimes it jumps to 1% when I start dragging, but it is not consistent.

davidlamhauge avatar Mar 10 '19 07:03 davidlamhauge

I'm having the same issues for MMB on Windows 7 Ultimate as David describes. MMB is consistently broken when using the navigation modifiers on drawing tools. The best way to quickly test it is by pressing CTRL + H, pressing MMB and move it slightly. The reproduction behavior is similar to the other bug report that was closed at #1169 but only with MMB.

Edit: Also tested with the Hand tool, it has similar issues, only with MMB.

Jose-Moreno avatar Mar 17 '19 22:03 Jose-Moreno

@scribblemaniac @davidlamhauge Hey guys. If you have some time, could you test if this issue is still present for you (for both stylus & mouse) on the latest nightly build?

Since we recently closed #1286 for Windows, I'm hoping this one can be closed as well, assuming the issues have been ironed of course.

In the other sibling ticket user Kaiko reports that only SHIFT + RMB has some "trembling" left, but it still works better than before. The other reported shortcuts should hopefully work fine now as well.

Thanks in advance 😃

Jose-Moreno avatar Sep 09 '20 01:09 Jose-Moreno