diff --git a/swing/src/net/sf/openrocket/gui/main/SimulationPanel.java b/swing/src/net/sf/openrocket/gui/main/SimulationPanel.java index 00d0d4257..7f2b2bc6f 100644 --- a/swing/src/net/sf/openrocket/gui/main/SimulationPanel.java +++ b/swing/src/net/sf/openrocket/gui/main/SimulationPanel.java @@ -688,12 +688,13 @@ public class SimulationPanel extends JPanel { String documentFileName = document.getRocket().getName(); documentFileName += ".csv"; fch.setSelectedFile(new File(documentFileName)); - String csvFileLocation = System.getProperty("user.home") + "/Documents"; + + File currentDir = null; if (!lastSelectedLocation.equals("")) { - csvFileLocation = lastSelectedLocation; + currentDir = new File(lastSelectedLocation); } - fch.setCurrentDirectory(new File(csvFileLocation)); + fch.setCurrentDirectory(currentDir); return fch; }