Revision 1711

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/VFSJFileChooserBased.java
149 149
    @Override
150 150
    public int showOpenDialog(Component parent) {
151 151
        FileDialogChooserManager manager = ToolsUtilLocator.getFileDialogChooserManager();
152
        File f = manager.getLastPath(fileChooserID, this.getCurrentDirectory());
153
        this.jfc.setCurrentDirectory(f);
152
        File f = this.getCurrentDirectory();
153
        if( f==null ) {
154
            f = manager.getLastPath(fileChooserID, null);
155
            this.jfc.setCurrentDirectory(f);
156
        }        
154 157
        VFSJFileChooser.RETURN_TYPE r = this.jfc.showOpenDialog(parent);
155 158
        if( r == VFSJFileChooser.RETURN_TYPE.CANCEL ) {
156 159
            return CANCEL_OPTION;            
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
29 29
    @Override
30 30
    public int showOpenDialog(Component parent) throws HeadlessException {
31 31
        FileDialogChooserManager manager = ToolsUtilLocator.getFileDialogChooserManager();
32
        File f = manager.getLastPath(fileChooserID, this.getCurrentDirectory());
33
        super.setCurrentDirectory(f);
32
        File f = this.getCurrentDirectory();
33
        if( f==null ) {
34
            f = manager.getLastPath(fileChooserID, null);
35
            super.setCurrentDirectory(f);
36
        }
34 37
        int r = super.showOpenDialog(parent);
35 38
        if( r == JFileChooser.APPROVE_OPTION ) {
36 39
            manager.setLastPath(fileChooserID, this.getCurrentDirectory());

Also available in: Unified diff