[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-kimageshop
Subject:    Re: [calligra] krita/ui/tool: end gesture when shift key is released
From:       Dmitry Kazakov <dimula73 () gmail ! com>
Date:       2012-12-24 18:05:35
Message-ID: CAEkBSfVgDhCMD25dOY9=f+bcgkeTb1O5EmRRn3RdgYksMJp3=w () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@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

[Attachment #5 (text/html)]

Hi!<br><br>Didn&#39;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:<br><br>1) Press Shift key<br>2) Start Mouse Drag operation<br> 3) Release \
Shift key or press *any* other keys --- the dragging will persist till you release \
the mouse. <br>4) Release the moube button --- this is the point when the gesture is \
stopped.<br><br>I guess, this was quite a convenient approach. <br> <br>This patch \
breaks this behavior. Could you tell, which bug did you fix?<br>  <br><br><div \
class="gmail_quote">On Sun, Dec 23, 2012 at 10:39 PM, Sven Langkamp <span \
dir="ltr">&lt;<a href="mailto:sven.langkamp@gmail.com" \
target="_blank">sven.langkamp@gmail.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Git commit d3a5208277369c42e91d28f4740f8a8b217e9cdc by Sven \
Langkamp.<br> Committed on 23/12/2012 at 19:39.<br>
Pushed by langkamp into branch &#39;master&#39;.<br>
<br>
end gesture when shift key is released<br>
<br>
M   +3      -0      krita/ui/tool/kis_tool.cc<br>
<br>
<a href="http://commits.kde.org/calligra/d3a5208277369c42e91d28f4740f8a8b217e9cdc" \
target="_blank">http://commits.kde.org/calligra/d3a5208277369c42e91d28f4740f8a8b217e9cdc</a><br>
 <br>
diff --git a/krita/ui/tool/kis_tool.cc b/krita/ui/tool/kis_tool.cc<br>
index cde18c0..b7f855f 100644<br>
--- a/krita/ui/tool/kis_tool.cc<br>
+++ b/krita/ui/tool/kis_tool.cc<br>
@@ -481,6 +481,9 @@ void KisTool::keyPressEvent(QKeyEvent *event)<br>
  void KisTool::keyReleaseEvent(QKeyEvent* event)<br>
  {<br>
        if (mode() == GESTURE_MODE) {<br>
+            if (event-&gt;key() == Qt::Key_Shift) {<br>
+                  endGesture();<br>
+            }<br>
              event-&gt;accept();<br>
        } else {<br>
              event-&gt;ignore();<br>
</blockquote></div><br><br clear="all"><br>-- <br>Dmitry Kazakov



_______________________________________________
kimageshop mailing list
kimageshop@kde.org
https://mail.kde.org/mailman/listinfo/kimageshop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic