Quick copy "disk folders" mode, file grouping, configurable EXIF fields and natural sort fix - #665
Open
bitblaster wants to merge 5 commits into
Open
Quick copy "disk folders" mode, file grouping, configurable EXIF fields and natural sort fix#665bitblaster wants to merge 5 commits into
bitblaster wants to merge 5 commits into
Conversation
Preferences > View now has an EXIF info fields table (checkboxes + move up/down) to choose which EXIF tags are shown in the image info panel (I key) and in what order, instead of the previous fixed alphabetical list. The Date/Time field also now prefers Exif.Photo.DateTimeOriginal over Exif.Image.DateTime (ModifyDate) when both are present.
Pressing "0" now toggles the panel between the configured shortcut folders (1-9) and the first 9 subfolders of the current image's directory, so files can be quickly filed into siblings of the folder being viewed without preconfiguring them. The last used mode is remembered across restarts (Settings::savedPathsDiskMode). Along the way, fixed a latent bug in MenuItem where its internal QHBoxLayout was a plain member handed to setLayout(), which expects a heap-allocated layout it can delete itself - this only surfaced now that CopyOverlay rebuilds its row widgets at runtime instead of just once at construction.
Adds an opt-in "grouping" mode that collapses files with the same name but different extensions (RAW+JPEG pairs, XMP sidecars, etc.) into one directory entry, picking a representative file by a configurable extension priority list. File operations (rename, move, copy, delete) on the representative are applied to every file in the group, and the UI (title bar, thumbnails) shows a "+ ext + ext" suffix for grouped entries.
Extracts several additional fields from DocumentInfo (lens ID/range, exposure compensation, computed light value, focus mode, orientation, GPS position, software) and prefers DateTimeOriginal/DateTimeDigitized over the file-modification DateTime tag. The info overlay's name column now sizes itself to the widest rendered label, values wrap instead of being clipped, and the overlay is no longer capped at a fixed width, since the new labels/values are often longer than before.
…he base name QCollator's locale-aware (ICU) collation weighs punctuation in ways that don't match plain ASCII order, and can rank '_' below '.' or even below digits. Comparing a full "name+extension" string in one go could therefore place e.g. "photo_01.tif" before "photo.jpg", or "img_2013.jpg" before "img006.jpg", unlike most file managers. Splitting the extension off before comparing (the same approach used by Dolphin's KFileItemModel) avoids ever comparing '.' against '_' or a digit in these cases, restoring the expected natural-sort ordering.
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.
Four improvements, built on top of each other:
1. "Disk folders" mode for the quick copy/move panel
Pressing
0now toggles the panel between the configured shortcut folders(1-9) and the first 9 subfolders of the current image's directory, so files
can be quickly filed into siblings of the folder being viewed without
preconfiguring them. The last used mode is remembered across restarts.
Also fixes a latent bug in
MenuItemwhere its internalQHBoxLayoutwasa plain member handed to
setLayout(), which expects a heap-allocatedlayout it can delete itself — this only surfaced now that
CopyOverlayrebuilds its row widgets at runtime instead of just once at construction.
2. Group files sharing a base name (e.g. RAW+JPEG+XMP) into a single entry
Adds an opt-in "grouping" mode (Settings → General) that collapses files
with the same base name but different extensions (RAW+JPEG pairs, XMP
sidecars, etc.) into one directory entry, picking a representative file by
a configurable extension priority list.
File operations (rename, move,
copy, delete) performed on the representative are applied to every file in
the group, and the UI (title bar, thumbnails) shows a "+ ext + ext" suffix
for grouped entries.
3. Configurable EXIF info fields, prefer DateTimeOriginal
Preferences → View now has an EXIF info fields table (checkboxes + move
up/down) to choose which EXIF tags are shown in the image info panel and in what order, instead of the previous fixed alphabetical list.
Extracts several additional fields (lens ID/range, exposure compensation,
computed light value, focus mode, orientation, GPS position, software) and
prefers
DateTimeOriginal/DateTimeDigitizedover the file-modificationDateTimetag.The info overlay's name column now sizes itself to the
widest rendered label, values wrap instead of being clipped, and the
overlay is no longer capped at a fixed width, since the new labels/values
are often longer than before.
4. Fix natural sort order to match most file managers (e.g. Dolphin)
QCollator's locale-aware (ICU) collation weighs punctuation in ways thatdon't match plain ASCII order, and can rank
_below.or even belowdigits. Comparing a full "name+extension" string in one go could therefore
place e.g.
photo_01.tifbeforephoto.jpg, orimg_2013.jpgbeforeimg006.jpg, unlike most file managers.Splitting the extension off before comparing (the same approach used by
Dolphin's
KFileItemModel) avoids ever comparing.against_or a digitin these cases, restoring the expected natural-sort ordering.