Bug 439970 - Action to toggle Pick tags/labels
Summary: Action to toggle Pick tags/labels
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Pick (other bugs)
Version First Reported In: 7.2.0
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-17 13:34 UTC by Philipp Keck
Modified: 2021-07-18 09:51 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 7.4.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Keck 2021-07-17 13:34:09 UTC
SUMMARY

I want a keyboard shortcut (i.e. a menu/toolbar action that I can bind to) which adds the Pick label "Accepted" when it's not there yet, or removes it when it's already there. Similar actions are thinkable for the other pick labels.

A single keyboard shortcut can be bound to an easily reachable key like the spacebar, which allows for very quick labeling of images (compared to the default shortcuts Alt+4 and Alt+0).
Comment 1 Maik Qualmann 2021-07-17 15:41:40 UTC
I don't think it's a good idea that we define an additional shortcut for a toggle action.
What do you think of the idea that for a single selected item, e.g. Alt + 3, has a toggle function. And also all other pick labels or color labels keyboard shortcuts?

Maik
Comment 2 Philipp Keck 2021-07-17 15:46:14 UTC
That'd work for me.

What happens when triggering the action for a pick label that's already present? Will it remove the label (leaving no pick label behind), or will it assign the "None" pick label? (I don't know if this distinction is even technically relevant.) I'd say "None".

What happens when triggering the action on a selection of files where only some have a/the pick label? Will it switch to the picked label -- and only to "None" if *all* selected files already have the label? I'd say yes.

What happens when triggering the "None" action on a file that is already "None"? I assume nothing happens, i.e. this one doesn't actually toggle.
Comment 3 Philipp Keck 2021-07-17 15:49:29 UTC
And should the UI labels be changed from "Assign Pick Label" to "Toggle Pick Label". Btw the shortcuts that can be configured for individual tags (not in the global keyboard settings) already have this toggling behavior since https://invent.kde.org/graphics/digikam/-/commit/d00a9dd5355 (10 years ago).
Comment 4 Maik Qualmann 2021-07-17 15:53:04 UTC
The toggle function only works for single selected file. I think with multi selection inverting would be a big mess.
You seem to be compiling digiKam from git/master, I just commit it and you take a look at it.

Maik
Comment 5 Maik Qualmann 2021-07-17 15:55:29 UTC
Git commit 30b8043fba5213ff991a0fe12332b4b4f537d5d7 by Maik Qualmann.
Committed on 17/07/2021 at 15:54.
Pushed by mqualmann into branch 'master'.

add label toggle action for single selected item

M  +33   -3    core/app/views/stack/itemiconview_tags.cpp

https://invent.kde.org/graphics/digikam/commit/30b8043fba5213ff991a0fe12332b4b4f537d5d7
Comment 6 Philipp Keck 2021-07-17 16:07:29 UTC
Thank you! This works perfectly for my use case.
Comment 7 Maik Qualmann 2021-07-17 16:27:24 UTC
I'll change it again for multiple selected items. It is only switched if all items are the same. Would be nice if you would test it too.

Maik
Comment 8 Maik Qualmann 2021-07-17 16:43:13 UTC
Git commit 7f858a18fa1a568408635f9949636700f5808127 by Maik Qualmann.
Committed on 17/07/2021 at 16:42.
Pushed by mqualmann into branch 'master'.

apply toggle action when all selected items are identical labels

M  +18   -12   core/app/views/stack/itemiconview_tags.cpp

https://invent.kde.org/graphics/digikam/commit/7f858a18fa1a568408635f9949636700f5808127
Comment 9 Philipp Keck 2021-07-17 17:16:32 UTC
So now it's the behavior proposed in comment 2. I can confirm that this works as intended. And I think it make sense from a user perspective.
Comment 10 Maik Qualmann 2021-07-17 17:45:53 UTC
Thanks for testing and your feedback.

Maik