[calligra] krita/ui/tool: end gesture when shift key is released
Sven Langkamp
sven.langkamp at gmail.com
Thu Dec 27 12:11:20 UTC 2012
On Mon, Dec 24, 2012 at 7:05 PM, Dmitry Kazakov <dimula73 at 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 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
> _______________________________________________
> kimageshop mailing list
> kimageshop at kde.org
> https://mail.kde.org/mailman/listinfo/kimageshop
>
More information about the kimageshop
mailing list