Bug 351866

Summary: Make focus to input field after adding a face rectangle as an option and not by default
Product: [Applications] digikam Reporter: Stas <stas.kazmin>
Component: Faces-WorkflowAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist CC: 1127553236, caulier.gilles, laurakittyinka, metzpinguin
Priority: NOR    
Version: 4.12.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.8.0
Attachments: Action added for controlling the focus in the text field
icon
no focus
has focus
which region

Description Stas 2015-08-27 16:17:37 UTC
Hello, 

I see now, that a new focus feature is realized in the actual version 4.12. 

https://bugs.kde.org/show_bug.cgi?id=345184

Here is the feature request

Can you change this feature  so one can optionally turn it on and off. 

I have a different work flow (as I think this is the fastest one): I first go through all pictures and draw rectangles in case there are not already there. Than I go to face menu and just select all faces of the same person and assign the face tag. This way I have to type the name only once. With the new focus I can not move from picture to picture fast (with shortcuts) but have to do it with the mouse. 

Please do it as an option ;)

Thanks ;)

Reproducible: Always
Comment 1 Maik Qualmann 2015-08-27 16:42:48 UTC
I can navigate with focus in the input field with the up and down cursor keys to next image.

Maik
Comment 2 Yingjie Liu 2017-03-06 10:53:55 UTC
Created attachment 104401 [details]
Action added for controlling the focus in the text field

Hi,
I add a QAction in the toolbar beside the "Show Fullscreen" action, which is shown in attachment "icon". I added a flag in FaceGroup class which can be changed by toggling the new action. The value of the flag will be conveyed to class AssignNameWidget, and a flag called noFocus will have the same value. Then in function showEvent(QShowEvent* e), if noFocus is true, the function will return with no focus in the text field.
If user click the new action, there will be no focus in the text field after he draw a new face rectangle, as shown in attachment "no_focus".
If user click the new action again, there will be focus in the text field after he draw a new face rectangle, as shown in attachment "has_focus".
I commented the patch for readability.
If there are more easier method, I will try it and change the code.
Comment 3 Yingjie Liu 2017-03-06 10:54:12 UTC
Created attachment 104402 [details]
icon
Comment 4 Yingjie Liu 2017-03-06 10:54:31 UTC
Created attachment 104403 [details]
no focus
Comment 5 Yingjie Liu 2017-03-06 10:54:45 UTC
Created attachment 104404 [details]
has focus
Comment 6 Barbara Scheffner 2017-03-06 11:20:49 UTC
(In reply to Yingjie Liu from comment #2)
> Created attachment 104401 [details]
> Action added for controlling the focus in the text field
> 
> Hi,
> I add a QAction in the toolbar beside the "Show Fullscreen" action, ...

Just something about usability / GUI: I don't like the idea of having that action in the Main Toolbar. Should be better somewhere in the Left Sidebar so that it disappears once you leave People View.

Wolfgang Scheffner (documenter)
Comment 7 Yingjie Liu 2017-03-07 01:34:18 UTC
(In reply to Wolfgang Scheffner from comment #6)
> (In reply to Yingjie Liu from comment #2)
> > Created attachment 104401 [details]
> > Action added for controlling the focus in the text field
> > 
> > Hi,
> > I add a QAction in the toolbar beside the "Show Fullscreen" action, ...
> 
> Just something about usability / GUI: I don't like the idea of having that
> action in the Main Toolbar. Should be better somewhere in the Left Sidebar
> so that it disappears once you leave People View.
> 
> Wolfgang Scheffner (documenter)

Hi, Wolfgang,
I added the action in the people's view which is shown in attachment "which region", and it will disappear when user leave people view. Do you mean that I have to add the action in region A (which is able to add a left sidebar) I circled in attachment "which region"? Thanks.
Yingjie Liu
Comment 8 Yingjie Liu 2017-03-07 01:35:02 UTC
Created attachment 104423 [details]
which region
Comment 9 Barbara Scheffner 2017-03-07 19:21:04 UTC
(In reply to Yingjie Liu from comment #7)

Sorry, I got it wrong. "...in the toolbar beside the "Show Fullscreen" action, " lead me somehow to the Main Toolbar right under the main menu. You were talking about the toolbar of the preview. That's absolutely okay, leave it there!


> and it will disappear when user leave people view. ...

Well, the preview is used in other views too but since it always have the add-face-tag icon its a must that your new icon will show up there as well (which it probably does anyway).

Wolfgang Scheffner
Comment 10 Maik Qualmann 2017-09-21 10:45:09 UTC
Git commit 6013471f12510bd52cca4b2fb2bb44848558e1e3 by Maik Qualmann.
Committed on 21/09/2017 at 10:41.
Pushed by mqualmann into branch 'master'.

when popup is not visible change with up and down keys the image
BUFS: 351866
FIXED-IN: 5.8.0

M  +2    -1    NEWS
M  +8    -5    libs/tags/addtagscombobox.cpp

https://commits.kde.org/digikam/6013471f12510bd52cca4b2fb2bb44848558e1e3