Skip to content
Permalink
Browse files

impproved guess for correct folder to load net from

  • Loading branch information
Tobi Delbruck Tobi Delbruck
Tobi Delbruck authored and Tobi Delbruck committed Oct 7, 2019
1 parent d9649ba commit caa129ca24beecb42a7af59690d9f34b00f97235
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/ch/unizh/ini/jaer/projects/npp/AbstractDavisCNNProcessor.java
@@ -185,7 +185,11 @@ protected File openFileDialogAndGetFile(String tip, String key, String defaultFi
String name = getString(key, defaultFile);
JFileChooser c = new JFileChooser(name);
File f = new File(name);
c.setCurrentDirectory(new File(getString(key, "")));
String cp = getClass().getName();
cp = cp.substring(0, cp.lastIndexOf('.'));
// find src folder with the class, try to start with this folder if key has not been stored
String path = "src" + File.separator + cp.replace('.', File.separatorChar);
c.setCurrentDirectory(new File(getString(key, path)));
c.setToolTipText(tip);
FileFilter filt = new FileNameExtensionFilter(type, ext);
c.setFileSelectionMode(JFileChooser.FILES_ONLY);

0 comments on commit caa129c

Please sign in to comment.
You can’t perform that action at this time.