Fix for #20899 (darkroom browsing broken when developed image is removed from collection)#20906
Open
masterpiga wants to merge 1 commit intodarktable-org:masterfrom
Open
Fix for #20899 (darkroom browsing broken when developed image is removed from collection)#20906masterpiga wants to merge 1 commit intodarktable-org:masterfrom
masterpiga wants to merge 1 commit intodarktable-org:masterfrom
Conversation
Handles the general case of "active image no longer matches the filter". `_active_image_rowid` is seeded at darkroom entry (`enter()`) and on every navigation (`_dev_change_image`). A new collection-changed callback (`_darkroom_collection_changed_callback`) hooks `DT_SIGNAL_COLLECTION_CHANGED`. On every collection change: * If the active image is still in the rebuilt `memory.collected_images`, the stored rowid is refreshed to its new position. * If the active image was filtered out, the stored rowid is left untouched — preserving the slot it last occupied, which is now held by whatever image came after it. `_dev_jump_image` uses `current_rowid + diff` when the image is still present, otherwise falls back to `_active_image_rowid + (diff - 1)` for forward jumps and `_active_image_rowid + diff` for backward jumps.
Contributor
Author
1 task
Contributor
|
What happens if you go to the first image, remove it with R, and then press backspace? Similarly, what happens if you go to the last image, remove it, and then press space? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Handles the general case of "active image no longer matches the filter".
_active_image_rowidis seeded at darkroom entry (enter()) and on every navigation (_dev_change_image).A new collection-changed callback (
_darkroom_collection_changed_callback) hooksDT_SIGNAL_COLLECTION_CHANGED. On every collection change:memory.collected_images, the stored rowid is refreshed to its new position._dev_jump_imageusescurrent_rowid + diffwhen the image is still present, otherwise falls back to_active_image_rowid + (diff - 1)for forward jumps and_active_image_rowid + difffor backward jumps.Fixes #20899. Co-authored with Claude.
Screen.Recording.2026-04-30.at.20.49.33.mp4