[calligra] krita/ui/tool: end gesture when shift key is released

Dmitry Kazakov dimula73 at gmail.com
Mon Dec 24 18:05:35 UTC 2012


Hi!

Didn't it finish the gesture when the mouse button was released? Because I
remember I wanted it to allow user to to the following kind of gesture:

1) Press Shift key
2) Start Mouse Drag operation
3) Release Shift key or press *any* other keys --- the dragging will
persist till you release the mouse.
4) Release the moube button --- this is the point when the gesture is
stopped.

I guess, this was quite a convenient approach.

This patch breaks this behavior. Could you tell, which bug did you fix?


On Sun, Dec 23, 2012 at 10:39 PM, Sven Langkamp <sven.langkamp at gmail.com>wrote:

> Git commit d3a5208277369c42e91d28f4740f8a8b217e9cdc by Sven Langkamp.
> Committed on 23/12/2012 at 19:39.
> Pushed by langkamp into branch 'master'.
>
> end gesture when shift key is released
>
> M  +3    -0    krita/ui/tool/kis_tool.cc
>
> http://commits.kde.org/calligra/d3a5208277369c42e91d28f4740f8a8b217e9cdc
>
> diff --git a/krita/ui/tool/kis_tool.cc b/krita/ui/tool/kis_tool.cc
> index cde18c0..b7f855f 100644
> --- a/krita/ui/tool/kis_tool.cc
> +++ b/krita/ui/tool/kis_tool.cc
> @@ -481,6 +481,9 @@ void KisTool::keyPressEvent(QKeyEvent *event)
>  void KisTool::keyReleaseEvent(QKeyEvent* event)
>  {
>      if (mode() == GESTURE_MODE) {
> +        if (event->key() == Qt::Key_Shift) {
> +            endGesture();
> +        }
>          event->accept();
>      } else {
>          event->ignore();
>



-- 
Dmitry Kazakov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kimageshop/attachments/20121224/ee321545/attachment.html>


More information about the kimageshop mailing list