Bug 373128 - Incorrect behavior for "Copy image(s) to ..." menu
Summary: Incorrect behavior for "Copy image(s) to ..." menu
Status: RESOLVED FIXED
Alias: None
Product: kphotoalbum
Classification: Applications
Component: Thumbnail Viewer (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KPhotoAlbum Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-01 07:32 UTC by Mark Harrison
Modified: 2016-12-01 22:49 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Harrison 2016-12-01 07:32:14 UTC
After selecting one or more images in the thumbnail viewer and selecting "Copy image(s) to ...". on the right-click menu, the file dialog that appears only allows the selection of an existing file. This does not make sense to me since I don't want to overwrite a file with the selected pictures. I just want to copy the pictures to another location.

In lines 93 and 99 of MainWindow/CopyPopUp.cpp, the QFileDialog has setFileMode( QFileDialog::ExistingFile ). Unless I'm misunderstanding this function, a better file mode would be QFileDialog::Directory, especially since, if copying all selected images, this line is run (line 100): dialog.setOption( QFileDialog::ShowDirsOnly, true).
Comment 1 Tobias Leupold 2016-12-01 08:33:32 UTC
This is actually a regression that happened during the KF5/Qt5 port. I'll fix it asap, thanks for the bug report :-)
Comment 2 Mark Harrison 2016-12-01 19:58:13 UTC
Thanks for the quick response. After thinking about it, I believe the file mode options should be

- Copy single picture: QFileDialog::AnyFile (in case the user wants to rename the copied picture, defaulted to the original file name)
- Copy multiple pictures: QFileDialog::Directory
Comment 3 Tobias Leupold 2016-12-01 22:49:17 UTC
Should be fixed with commit https://commits.kde.org/kphotoalbum/9a0f05662e2376f44799681a955e76e057dd86a3

If not, feel free to re-open this!