Revision 3107

View differences:

org.gvsig.tools/library/trunk/org.gvsig.tools/org.gvsig.tools.util/org.gvsig.tools.util.impl/src/main/java/org/gvsig/filedialogchooser/impl/JFileChooserBased.java
33 33
    @Override
34 34
    public int showOpenDialog(Component parent) throws HeadlessException {
35 35
        FileDialogChooserManager manager = ToolsUtilLocator.getFileDialogChooserManager();
36
        File f = this.getCurrentDirectory();
37
        if( f==null ) {
38
            f = manager.getLastPath(fileChooserID, null);
39
            super.setCurrentDirectory(f);
36
        File f = manager.getLastPath(fileChooserID, null);
37
        if( f == null ) {
38
            f = this.getCurrentDirectory();
39
            if( f == null ) {
40
                f = new File(System.getProperty("user.home"));
41
                this.setCurrentDirectory(f);
42
            }
43
        } else {
44
                this.setCurrentDirectory(f);
40 45
        }
41 46
        if(this.visibleCharsetPicker){
42 47
            this.charsetPicker = DefaultFileDialogChooserManager.setCharsetAccesoryPanel(this);

Also available in: Unified diff