Bug 352747 - While in working in filter dialog ( namely blur, gaussian etc) clicking outside the dialog applies the filter and closes the dialog box.
Summary: While in working in filter dialog ( namely blur, gaussian etc) clicking outsi...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: 2.9.7
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-15 14:24 UTC by Raghavendra kamath
Modified: 2018-01-30 08:21 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 Raghavendra kamath 2015-09-15 14:24:31 UTC
While applying some filter if a user clicks outside the dialog box by mistake the dialog box closes and the filter gets applied. The user then has to undo two times and go to the filter dialog again.

A user can inadvertently click on the canvas while panning or zooming, which will then be a problem as the filter gets applied immediately

you can see the bug in action here -> https://dl.dropboxusercontent.com/u/37777793/blur.mp4

Reproducible: Always

Steps to Reproduce:
1.Open a document in Krita and add some content may be blobs of color.
2.Open blur filter dialog box
3.Now click outside on canvas area

Actual Results:  
the filter gets applied and the dialog box closes

Expected Results:  
the filter shouldn't be applied until the apply button is pressed
Comment 1 Halla Rempt 2016-03-25 16:28:21 UTC
I can confirm that this happens, I'm not sure whether we should change it, or whether the current behavior is actually intended....
Comment 2 Raghavendra kamath 2016-04-07 08:52:02 UTC
@Boudewijn the current behaviour has problems, mainly when user accidentally clicks on canvas and then the undesired filter gets applied . The filter should not get applied unless the user has explicitly pressed 'OK'. 
Also in some applications the user is allowed to pan and zoom the canvas while the filter dialog is open in order for him to see and inspect the effect correctly, some times the user triggers the filter dialog when he is zoomed in state and in order to check the artwork correctly he has to navigate, the same applies when is zoomed out he may want to zoom in and check the effects.

In GIMP for example user can navigate the canvas while still having the filter dialog open, this helps in closer inspection of the preview before applying the filter.

This bug actually disables or hinders that functionality so i think this shouldn't be made default behaviour

In Krita currently we can pan the canvas with middle , it is the left click that applies the filter.
Comment 3 Halla Rempt 2018-01-24 11:58:18 UTC
Hm, this problem was introduced in 

-----------------------
commit 78bbb726b49dab6c7a0ee492f2e2a3dd97b7fe30
Author: Dmitry Kazakov <dimula73@gmail.com>, Sun May 18 23:46:58 2014 +0400 (3 years, 8 months ago)
Committer: Dmitry Kazakov <dimula73@gmail.com>, Sun May 18 23:49:54 2014 +0400 (3 years, 8 months ago)
Precedes: v2.99.88
Branches: <Expand>

Fix a hang-up when opening the filter dialog twice

Or running any stroke-based action while having the dialog open

BUG:334982
-----------------------------

In order to make it impossible to open the filter dialog twice. However, that code has been rewritten since, and there's only one file dialog in any case, and selecting a new filter in the menu just changes the filter in the dialog.

There's also no hang anymore when, for instance, using the rectangle tool.

I wonder whether we can now just remove the slotStrokeEndRequested and slotStrokeCancelRequested methods in KisFilterManager.

The end goal is to make it possible to zoom and pan while the filter dialog is open, but not allow the user to do anything else, I guess.
Comment 4 Dmitry Kazakov 2018-01-29 10:54:28 UTC
Yes, the problem is, when one starts to paint on the canvas a new stroke is started. And the filter manager sees himself hijacked and closes itself
Comment 5 Dmitry Kazakov 2018-01-30 08:21:51 UTC
Git commit 042dbe5190fa613ae53a24236ad3eb19b2b03b16 by Dmitry Kazakov.
Committed on 29/01/2018 at 13:35.
Pushed by dkazakov into branch 'master'.

Block all the non-view input user actions while filter dialog is active

Now all the input actions are divided into two groups: view-transform and
modifying. And the canvas can block any of these action by setting a special
flag, that is checked by the shortcuts matcher.

When the filter dialog opens, it just blocks all the modifying actions,
allowing the view ones at the same time :)

M  +1    -0    libs/ui/CMakeLists.txt
M  +11   -0    libs/ui/canvas/kis_canvas2.cpp
M  +14   -1    libs/ui/canvas/kis_canvas2.h
M  +10   -5    libs/ui/dialogs/kis_dlg_filter.cpp
A  +34   -0    libs/ui/input/KisInputActionGroup.cpp     [License: GPL (v2+)]
A  +79   -0    libs/ui/input/KisInputActionGroup.h     [License: GPL (v2+)]
M  +6    -0    libs/ui/input/kis_abstract_input_action.cpp
M  +7    -0    libs/ui/input/kis_abstract_input_action.h
M  +4    -2    libs/ui/input/kis_abstract_shortcut.cpp
M  +3    -1    libs/ui/input/kis_abstract_shortcut.h
M  +5    -0    libs/ui/input/kis_input_manager_p.cpp
M  +6    -0    libs/ui/input/kis_pan_action.cpp
M  +2    -0    libs/ui/input/kis_pan_action.h
M  +6    -0    libs/ui/input/kis_rotate_canvas_action.cpp
M  +2    -0    libs/ui/input/kis_rotate_canvas_action.h
M  +14   -3    libs/ui/input/kis_shortcut_matcher.cpp
M  +5    -0    libs/ui/input/kis_shortcut_matcher.h
M  +6    -0    libs/ui/input/kis_zoom_action.cpp
M  +2    -0    libs/ui/input/kis_zoom_action.h

https://commits.kde.org/krita/042dbe5190fa613ae53a24236ad3eb19b2b03b16