This commit is contained in:
Reinhard Pointner 2016-03-19 20:44:12 +00:00
parent 2db3a8bb55
commit 8b73ca9d40
2 changed files with 7 additions and 7 deletions

View File

@ -188,12 +188,6 @@ public class Main {
} }
} }
// handle file arguments
List<File> files = args.getFiles(false);
if (files.size() > 0) {
eventBus.post(new FileTransferable(files));
}
try { try {
// restore previous size and location // restore previous size and location
restoreWindowBounds(frame, Settings.forPackage(MainFrame.class)); restoreWindowBounds(frame, Settings.forPackage(MainFrame.class));
@ -246,6 +240,12 @@ public class Main {
frame.setIconImages(ResourceManager.getApplicationIcons()); frame.setIconImages(ResourceManager.getApplicationIcons());
} }
// handle file arguments
List<File> files = args.getFiles(false);
if (files.size() > 0) {
eventBus.post(new FileTransferable(files));
}
// start application // start application
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setVisible(true); frame.setVisible(true);

View File

@ -142,7 +142,7 @@ public class MacAppUtilities {
Application.getApplication().setOpenFileHandler(evt -> { Application.getApplication().setOpenFileHandler(evt -> {
List<File> files = evt.getFiles(); List<File> files = evt.getFiles();
if (files.size() > 0) { if (files.size() > 0) {
SwingUtilities.invokeLater(() -> handler.accept(evt.getFiles())); SwingUtilities.invokeLater(() -> handler.accept(files));
} }
}); });
} catch (Throwable t) { } catch (Throwable t) {