[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:       Sven Langkamp <sven.langkamp () gmail ! com>
Date:       2012-12-27 12:11:20
Message-ID: CAAmsBfm3HitQVcZnwVppk-5h8ky_UriaibwGVfRdzT+gOwXBxg () mail ! gmail ! com
[Download RAW message or body]

On Mon, Dec 24, 2012 at 7:05 PM, Dmitry Kazakov <dimula73@gmail.com> wrote:
> 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?#

I changed that based on feedback from Roey on IRC. He wanted to also
have the gesture abort when the key is released.

>
>
>
> 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
> _______________________________________________
> kimageshop mailing list
> kimageshop@kde.org
> https://mail.kde.org/mailman/listinfo/kimageshop
>
_______________________________________________
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