Keyboard shortcut for "Assign to map center"

Tobias Leupold tl at stonemx.de
Wed May 22 06:41:43 BST 2024


E-Mail von Robert Menger vom Mittwoch, 22. Mai 2024, 07:09:25 CEST:
> Hi Tobias,
> 
> I also expected it to be an trivial action and was hoping for a
> "one-liner".
> 
> I guess creating two context-menu entries is quite some effort? Because
> from the UX it would make more sense to call it "reassign..."  on the
> left side pane because there is already a tag present. That would be the
> clean soloution.

It's no effort at all, because both lists (if you use separate lists) are 
instances of the same class. So the context menu is there without any 
additional work. The object itself knows it's role (assigned/unassigned/
merged) and enables or disables the menu entries accordingly.

I'll check the wording though.

> For a quick fix the behavior could simply check if there are any
> pictures in the unassigned list and if there is a selection if so than
> us this. If there is no selection use the first. If there is no picture
> in the unassigned pane then do nothing (one could remove all the tags
> from assigned pictures and start over again)
> 
> 
> is that an option?

I'll try to implement something like this and push it to a branch, so that you 
can test it. That's essentially what I thought of yesterday :-)

> best
> 
> Robert
> 
> On 21.05.24 23:31, Tobias Leupold wrote:
> > E-Mail von Robert Menger vom Dienstag, 21. Mai 2024, 22:35:17 CEST:
> >> Dear developers of kgeotag,
> >> 
> >> 
> >> Im currently geotagging my entire collection of thousands of pictures,
> >> where every picture was taken at a different spot and I need to select
> >> that spot on the map an than assign the current map-position to the
> >> image.
> >> 
> >> Works pretty well except that a keyboard-shortcut is missing to perform
> >> that action to the current selection (or if nothing is selected the
> >> topmost image).
> >> 
> >> 
> >> Is there a way to implement a new shortcut? If someone could point me to
> >> the right direction in the code (and a tutorial how to build), I could
> >> also create a PR on GH.
> >> 
> >> 
> >> best
> >> 
> >> Robert
> > 
> > Hi Robert!
> > 
> > (best thing would be to subscribe to the mailing list, your message needed
> > approval ...)
> > 
> > This is a nice idea!
> > 
> > I thought this would be quite trivial to implement, but it's not ... I
> > tried to use the main window's KActionCollection to add the respective
> > context menu action. Problem is that both the "assigned" and the
> > "unassigned" list use the same context menu ... at least I think so, the
> > program simply crashed due to an empty images list (most probably from
> > the "unassigned" images list) that shouldn't be empty. I didn't track it
> > back completely though. However, I think that the context menu's action
> > is the wrong place to do it, as we want to use a global shortcut here.
> > 
> > I think we need additional logic for this. A top-level main window action
> > like "Assign all currently selected or viewed images to the map center"
> > or so. Which then checks if one or more unassigned images are currently
> > selected, or some images in the combined list. Or if an image is
> > currently previewed, which we may want to assign.
> > 
> > Question is what logic we need to add here. What's your exact workflow?
> > What exact behavior would you expect?
> > 
> > May actually not be trivial at all the longer I think about it, but maybe,
> > we can improve that kind of tagging a lot by it.
> > 
> > Thanks for you input and for your help :-)
> > 
> > Cheers, Tobias




More information about the KGeoTag mailing list