Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple file import - Order reversed #936

Open
marcluer opened this issue Aug 10, 2023 · 9 comments
Open

Multiple file import - Order reversed #936

marcluer opened this issue Aug 10, 2023 · 9 comments
Labels

Comments

@marcluer
Copy link

Describe the bug

When importing multiple files, they are imported in reverse order. (last pdf comes first)

To Reproduce

Steps to reproduce the behavior:

  1. Open PDF arranger
  2. Click on 'Import' Icon
  3. Select multiple pdf files. e.g.
  • Bank-statement_202101.pdf
  • Bank-statement_202102.pdf
  • Bank-statement_202103.pdf
  1. The files are now showing up in the preview in the opposite order
  • ...202103.pdf
  • ...202102.pdf
  • ...202101.pdf
  1. When "saving as", the same (reverse order) is kept

Workaround

Inside the import dialog, I sort the files in reverse order (descending).
The files will now be imported in the expected order (ascending).

Expected behavior

I would expect the import the files in the order, that is shown in the import dialog.

System and Versions

  • PDF Arranger 1.10.00, downloaded from github releases
  • Windows 11
@kbengs kbengs added the Windows label Aug 10, 2023
@kbengs
Copy link
Member

kbengs commented Aug 10, 2023

Thanks for reporting. I see the same behavior. In Linux it works as expected.

@kbengs
Copy link
Member

kbengs commented Aug 12, 2023

The flatpak install seems to add them in reversed order too.

In Windows the order seems to be even more complicated. I can't see the exact logic it use. It has somewhat to do with the order the files are selected in the dialog. This was observed on Windows 10.

@marcluer are the files always added in reversed order, no matter how you select the files in the dialog?

@kbengs kbengs mentioned this issue Aug 12, 2023
@marcluer
Copy link
Author

screenshot-1691871030
The logic, how the "File name" text box in the import window is populated, is quite strange indeed.
But the "File name" text box does not seem to play any role in the import order.

The actual import order is always reversed to the selected sort order.
In the above screenshot I would get a consistent import of 5-4-3-2-1.

@dreua
Copy link
Member

dreua commented Aug 13, 2023

Could this be a Bug in Gtk or Windows?

@kbengs
Copy link
Member

kbengs commented Aug 13, 2023

Yeah they are "just" reversed for me too. Maybe I was too tired yesterday..

Could this be a Bug in Gtk or Windows?

Yes probably. Maybe FileChooserNative? For Windows we could easily just reverse the order. Not sure how the flatpak could be fixed. Flatpak was tested in KDE.

@dreua
Copy link
Member

dreua commented Aug 13, 2023

If it happens all the time with flatpaks, we can easily detect and reverse that too. Needs some more testing to see if it is always reversed. Do we also have those issues with drag and drop from the file explorer or is it just with the import?

@marcluer
Copy link
Author

Drag and drop from Windows Explorer to PDF Arranger window seems to be in completely random order. Even doing the exact same way of selecting the files twice, will generate
a different order.

Recording.2023-08-13.180152.mp4

kbengs added a commit to kbengs/pdfarranger that referenced this issue Aug 17, 2023
@kbengs
Copy link
Member

kbengs commented Aug 17, 2023

If it happens all the time with flatpaks,

I have tested Fedora flatpak + rpm in KDE + Gnome and Ubuntu flatpak + deb in KDE + GNome. For these the flatpak always reverse the import order whereas the rpm/deb does not.

Do we also have those issues with drag and drop from the file explorer or is it just with the import?

I think we can do nothing about the drag and drop order. (except adding a sort action)

jeromerobert pushed a commit to kbengs/pdfarranger that referenced this issue Aug 18, 2023
jeromerobert pushed a commit to kbengs/pdfarranger that referenced this issue Aug 22, 2023
jeromerobert pushed a commit that referenced this issue Aug 22, 2023
@JunglePredator
Copy link

Drag and drop from Windows Explorer to PDF Arranger window seems to be in completely random order. Even doing the exact same way of selecting the files twice, will generate a different order.

This... is actually why I suggested bulk file renaming sequentially in another post only I didn't realise it was a bug. -.-;;
It only came into play when updating a PDF using files from an outside source & the filename was random already....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants