Bug 302758 - Zoom center is wrong (was: Canvas Interaction feedback)
Summary: Zoom center is wrong (was: Canvas Interaction feedback)
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Unclassified
Component: Usability (show other bugs)
Version: git master (please specify the git hash!)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-06-29 18:07 UTC by David REVOY
Modified: 2012-11-20 16:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David REVOY 2012-06-29 18:07:45 UTC
Here are 2 feedback I wrote on the mailing list thread "Merged the first bits of Canvas Interaction" (06/26/2012 04:21 PM). I duplicate them here to make it easier to maintain. 

1/ zoom origin
Zooming is always centered to the viewport, could it be centered in the cursor/mouse position ( the start position when the dragging action is performed ) ?
( ex: I start to press Ctrl+Space on keyboard ; I move my cursor hover top left , and click to zoom = the zoom is focusing on this zone )

2/ switch from 'Ctrl-space zoom' to 'space pan' and vice versa.
When pressing Ctrl+Space+click to zoom, if I keep space hold and release Ctrl it's not switch to panning , and the zoom continue. I would love to can do it.
Same for reverse : While panning with space pressed, I would love to only add control to switch to zooming. 

Reproducible: Always

Actual Results:  
 

Expected Results:
Comment 1 Halla Rempt 2012-07-29 12:59:07 UTC
Ack...
Comment 2 Halla Rempt 2012-08-08 19:20:00 UTC
marking as regression.
Comment 3 Dmitry Kazakov 2012-11-11 09:00:41 UTC
The same bug happens when you try to Rotate a canvas: pressing Shift allows to rotate it only once. After you release Middle Button, you need to press shift one more time.
Comment 4 Dmitry Kazakov 2012-11-11 10:15:06 UTC
Pressing Ctrl, then holding '+' or '-' keys enables Keys Autorepeat that has to be disabled.
Comment 5 Dmitry Kazakov 2012-11-12 15:34:53 UTC
Git commit ac7eea24b10c0920fbef3e65f59db2722998d30e by Dmitry Kazakov.
Committed on 12/11/2012 at 16:33.
Pushed by dkazakov into branch 'krita-new-move-tool-kazakov'.

Fixed the second half of bug 302758

This patch almost rewrites the KisInputManager to fix the mentioned
bug. Now all the state transitions of the actions are controlled by
a special class KisShorcutMatcher. This class is easily controlled by
a separate unittest. The work of the actions is now can be represented
by a simple state machine with three states (see docs for class
KisStrokeShortcut).

M  +4    -1    krita/ui/CMakeLists.txt
M  +39   -18   krita/ui/input/kis_abstract_input_action.cpp
M  +50   -23   krita/ui/input/kis_abstract_input_action.h
A  +68   -0    krita/ui/input/kis_abstract_shortcut.cpp     [License: GPL (v2+)]
A  +72   -0    krita/ui/input/kis_abstract_shortcut.h     [License: GPL (v2+)]
M  +16   -16   krita/ui/input/kis_alternate_invocation_action.cpp
M  +3    -5    krita/ui/input/kis_alternate_invocation_action.h
M  +16   -16   krita/ui/input/kis_change_primary_setting_action.cpp
M  +3    -5    krita/ui/input/kis_change_primary_setting_action.h
M  +218  -279  krita/ui/input/kis_input_manager.cpp
M  +4    -9    krita/ui/input/kis_input_manager.h
A  +70   -0    krita/ui/input/kis_key_shortcut.cpp     [License: GPL (v2+)]
A  +54   -0    krita/ui/input/kis_key_shortcut.h     [License: GPL (v2+)]
M  +17   -38   krita/ui/input/kis_pan_action.cpp
M  +4    -4    krita/ui/input/kis_pan_action.h
M  +25   -57   krita/ui/input/kis_rotate_canvas_action.cpp
M  +4    -9    krita/ui/input/kis_rotate_canvas_action.h
D  +0    -162  krita/ui/input/kis_shortcut.cpp
D  +0    -120  krita/ui/input/kis_shortcut.h
A  +287  -0    krita/ui/input/kis_shortcut_matcher.cpp     [License: GPL (v2+)]
A  +143  -0    krita/ui/input/kis_shortcut_matcher.h     [License: GPL (v2+)]
M  +3    -12   krita/ui/input/kis_show_palette_action.cpp
M  +1    -3    krita/ui/input/kis_show_palette_action.h
A  +72   -0    krita/ui/input/kis_stroke_shortcut.cpp     [License: GPL (v2+)]
A  +80   -0    krita/ui/input/kis_stroke_shortcut.h     [License: GPL (v2+)]
M  +33   -50   krita/ui/input/kis_tool_invocation_action.cpp
M  +3    -5    krita/ui/input/kis_tool_invocation_action.h
M  +19   -47   krita/ui/input/kis_zoom_action.cpp
M  +4    -8    krita/ui/input/kis_zoom_action.h
M  +6    -0    krita/ui/tests/CMakeLists.txt
A  +357  -0    krita/ui/tests/kis_input_manager_test.cpp     [License: GPL (v2+)]
C  +14   -19   krita/ui/tests/kis_input_manager_test.h [from: krita/ui/input/kis_show_palette_action.h - 053% similarity]     [License: GPL]

http://commits.kde.org/calligra/ac7eea24b10c0920fbef3e65f59db2722998d30e
Comment 6 Dmitry Kazakov 2012-11-13 15:19:34 UTC
Git commit 7a0132427816a5713595fa2aaa0a6f4017d32b45 by Dmitry Kazakov.
Committed on 13/11/2012 at 16:19.
Pushed by dkazakov into branch 'krita-new-move-tool-kazakov'.

Added discrete rotation and zooming shortcuts

M  +10   -3    krita/ui/input/kis_input_manager.cpp
M  +26   -2    krita/ui/input/kis_rotate_canvas_action.cpp
M  +5    -0    krita/ui/input/kis_rotate_canvas_action.h
M  +26   -5    krita/ui/input/kis_zoom_action.cpp
M  +1    -0    krita/ui/input/kis_zoom_action.h

http://commits.kde.org/calligra/7a0132427816a5713595fa2aaa0a6f4017d32b45
Comment 7 Dmitry Kazakov 2012-11-20 16:13:46 UTC
Git commit 80cb31e7938d92c59c0bec7c461186797c6a5ae8 by Dmitry Kazakov.
Committed on 12/11/2012 at 16:33.
Pushed by dkazakov into branch 'calligra/2.6'.

Fixed the second half of bug 302758

This patch almost rewrites the KisInputManager to fix the mentioned
bug. Now all the state transitions of the actions are controlled by
a special class KisShorcutMatcher. This class is easily controlled by
a separate unittest. The work of the actions is now can be represented
by a simple state machine with three states (see docs for class
KisStrokeShortcut).

M  +4    -1    krita/ui/CMakeLists.txt
M  +39   -18   krita/ui/input/kis_abstract_input_action.cpp
M  +50   -23   krita/ui/input/kis_abstract_input_action.h
A  +68   -0    krita/ui/input/kis_abstract_shortcut.cpp     [License: GPL (v2+)]
A  +72   -0    krita/ui/input/kis_abstract_shortcut.h     [License: GPL (v2+)]
M  +16   -16   krita/ui/input/kis_alternate_invocation_action.cpp
M  +3    -5    krita/ui/input/kis_alternate_invocation_action.h
M  +16   -16   krita/ui/input/kis_change_primary_setting_action.cpp
M  +3    -5    krita/ui/input/kis_change_primary_setting_action.h
M  +218  -279  krita/ui/input/kis_input_manager.cpp
M  +4    -9    krita/ui/input/kis_input_manager.h
A  +70   -0    krita/ui/input/kis_key_shortcut.cpp     [License: GPL (v2+)]
A  +54   -0    krita/ui/input/kis_key_shortcut.h     [License: GPL (v2+)]
M  +17   -38   krita/ui/input/kis_pan_action.cpp
M  +4    -4    krita/ui/input/kis_pan_action.h
M  +25   -57   krita/ui/input/kis_rotate_canvas_action.cpp
M  +4    -9    krita/ui/input/kis_rotate_canvas_action.h
D  +0    -162  krita/ui/input/kis_shortcut.cpp
D  +0    -120  krita/ui/input/kis_shortcut.h
A  +287  -0    krita/ui/input/kis_shortcut_matcher.cpp     [License: GPL (v2+)]
A  +143  -0    krita/ui/input/kis_shortcut_matcher.h     [License: GPL (v2+)]
M  +3    -12   krita/ui/input/kis_show_palette_action.cpp
M  +1    -3    krita/ui/input/kis_show_palette_action.h
A  +72   -0    krita/ui/input/kis_stroke_shortcut.cpp     [License: GPL (v2+)]
A  +80   -0    krita/ui/input/kis_stroke_shortcut.h     [License: GPL (v2+)]
M  +33   -50   krita/ui/input/kis_tool_invocation_action.cpp
M  +3    -5    krita/ui/input/kis_tool_invocation_action.h
M  +19   -47   krita/ui/input/kis_zoom_action.cpp
M  +4    -8    krita/ui/input/kis_zoom_action.h
M  +6    -0    krita/ui/tests/CMakeLists.txt
A  +357  -0    krita/ui/tests/kis_input_manager_test.cpp     [License: GPL (v2+)]
C  +14   -19   krita/ui/tests/kis_input_manager_test.h [from: krita/ui/input/kis_show_palette_action.h - 053% similarity]     [License: GPL]

http://commits.kde.org/calligra/80cb31e7938d92c59c0bec7c461186797c6a5ae8
Comment 8 Dmitry Kazakov 2012-11-20 16:13:47 UTC
Git commit b2b70f620b8b4d0a4168d67f04e811dfefb3f89e by Dmitry Kazakov.
Committed on 13/11/2012 at 16:19.
Pushed by dkazakov into branch 'calligra/2.6'.

Added discrete rotation and zooming shortcuts

M  +10   -3    krita/ui/input/kis_input_manager.cpp
M  +26   -2    krita/ui/input/kis_rotate_canvas_action.cpp
M  +5    -0    krita/ui/input/kis_rotate_canvas_action.h
M  +26   -5    krita/ui/input/kis_zoom_action.cpp
M  +1    -0    krita/ui/input/kis_zoom_action.h

http://commits.kde.org/calligra/b2b70f620b8b4d0a4168d67f04e811dfefb3f89e