Support for opening multiple files at once?

I’m not 100% sure if this should go into suggestions or support since I don’t quite know if this is already a feature that is bugged or if it hasn’t been implemented yet.

The basic premise is simple, just being able to drag and drop multiple files into Avogadro 2 and have them all open at once. Currently all that happens is that one file opens and then an error occurs for the second one, after which the remaining files are just stuck in loading bars but nothing opens.

I’d like to see some way to open them all at once, perhaps a simple queuing of the files to open in some order, although I don’t quite know if there is some order that files are sent to the program (i.e. if multiple files are dragged, is the order chronological, is it alphabetical, is it something else entirely). I’d probably prefer alphabetical if there’s a way to choose, but that’s mostly because the default way that files are displayed in Windows file explorer, or when using ls on Linux. I’m not sure about Mac, but it could very well also be the case.

1 Like

Huh.

The code in avogadroapp certainly should accept multiple drops, but I admit I haven’t tested that rigorously.

Put simply, it looks for a list of URLs (which in this case would be local files) and loops through each.

But I can confirm that I just crashed after dragging 5 output files to the window.. So that’s a bug.

1 Like

Corresponding GitHub issue opened at Opening multiple files via drag-and-drop does not work · Issue #578 · OpenChemistry/avogadroapp · GitHub

And the corresponding patch :wink:

2 Likes

Can confirm, this works great!

1 Like