Closed GoogleCodeExporter closed 9 years ago
Hallo the solution to this problem is in the class GtkFileChooserUI
in the method doDirectoryChanged(File olddir, File newdir, Object source) line
1256
if (getFileChooser().getCurrentDirectory().equals(newdir)) {
// to avoid repeated invocations on the same directory.
return;
}
here is the problem. Everytime when
JFileChooser chooser = new FileChooser(<the selected Dir>);
or
chooser.setCurrentDirectory(<the new Dir>)
is called the currentDirectory of the FileChooser is already set to the new
Dir, at the time when the if statement is executed. So the directory will not
be changed in the view.
Delete this if Statement and everything works fine.
The statement is needless cause the check is already made by the JFileChooser
itself
Original comment by mic.jaku...@gmail.com
on 28 Aug 2011 at 1:54
Do you have a patched version of the .jar file with the fix described above
that I can download? I've done the fix myself and rebuilt but now I get a null
pointer exception.
Original comment by stroebel...@gmail.com
on 15 Nov 2012 at 9:55
Duplicate of setCurrentDirectory is not working #85
Original issue reported on code.google.com by
mic.jaku...@gmail.com
on 28 Aug 2011 at 12:19