Darktable: Ranged selection can be started from an image not in the current collection.

Created on 2 Aug 2020  路  7Comments  路  Source: darktable-org/darktable

Following a discussion on IRC I decided to submit this as an issue.

Describe the bug
Ranged selection (shift+click) can be started from an image that is not in the current collection (but still selected). This can cause unintentionally selecting (and modifying) hundreds of images, which is not user friendly.

To Reproduce

  1. Open a collection in lighttable
  2. Select an image
  3. Remove this image from the current collection (e.g. rejecting or removing a tag), or switch to a different collection that does not contain this image.
  4. Shift+click on an image. All the images up to (or from) this image are now selected.

Expected behavior
Only the image clicked in step 4 is selected, and can be used as the start of a new ranged (shift+click) selection.

Platform

  • Darktable Version: can reproduce in official 3.0.2 and self-compiled 3.2.0 builds.
  • OS: Manjaro Gnome

Other comments
I guess this issue can also be formulated in a broader sense: Images stay selected when no longer in the current collection. This can be intended behaviour, but I think this is not intuitive.

On IRC, the following possible solutions were proposed.

  1. When using shift+click, check if the starting point is still in the current collection.
  2. When an image is removed from the collection (or the active collection is changed), reset the selection.
  3. When an image is removed from the collection, set the next image in line as selected. On switching collections, reset the selection or select the first image (up for discussion).

For me, the most intuitive solution would be: Select the next image when an image is removed. On switching collections, reset the selection (unless the old image is also in the new collection).

wip

All 7 comments

Due to how selection is rather persistent in darktable's lighttable here's how IMO should it work:

  1. never add any image to selection automagically. that's just asking for problems. image removed from collection is removed from curent selection, nothing is added to selection.
  2. switching collection removes selection. Nothing should be selected after switching collection. unless there's a very good corner case for that
  3. corner case for keeping selection is when all images in current selection will be present in new collection. But that's imho not that great and can be omited to keep logic simple.

"Adding to selection automagically is asking for problems" is a good point, so I think your summary of what should happen makes sense.
Also pinging @elstoc because he had an opinion on it as well.

I agree with @johnny-bit's summary. Most of the time selection (of images in the current collection but off-screen) is overridden by mouseover so I can't think of any issues. There are security options to warn when performing certain activities and I suppose there is an argument for adding another security option like "warn when applying changes to more than X images", which would prevent accidental rejection or rating of hundreds of images at once.

This issue did not get any activity in the past 30 days and will be closed in 365 days if no update occurs. Please check if the master branch has fixed it and report again or close the issue.

Pinging @AlicVB - if you have time can you please look at this one :)

Fully agree here, it's definitely not wanted ! and sorry to have skipped this bug when coming back from holiday...

I think the simpler way to do that is to implement that at the collection level, just before raising the collection changed signal.
At this point, we just have to ensure that all image in selection are still in collection, otherwise we remove them from selection.
That way we don't have "invisible" selected image, and we don't loose the remaining selection either...

I'll have a look

ok, I've look to the code, and it appears that the selected image list seems correctly updated after each collection change. The problem seems to be in how range selection works itself.

I'll propose a fix soon, but the good news at least is that I don't think you can really get selected images outside the current visible collection :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sboukortt picture sboukortt  路  3Comments

ChristopherRogers1991 picture ChristopherRogers1991  路  6Comments

Egocentrix picture Egocentrix  路  5Comments

Praveen-Rai picture Praveen-Rai  路  5Comments

johnny-bit picture johnny-bit  路  5Comments