fixed bug with file name when creating new file

This commit is contained in:
bancika
2011-01-26 23:57:09 +00:00
parent be7ab3412d
commit 5de6caf073
3 changed files with 11 additions and 5 deletions
@@ -1,15 +1,15 @@
<map>
<entry>
<string>metric</string>
<boolean>true</boolean>
<string>lastPath</string>
<string>C:\Documents and Settings\Branislav Stojkovic\Desktop</string>
</entry>
<entry>
<string>zoom</string>
<double>1.0</double>
</entry>
<entry>
<string>lastPath</string>
<string>C:\Documents and Settings\Branislav Stojkovic\Desktop</string>
<string>metric</string>
<boolean>true</boolean>
</entry>
<entry>
<string>default.org.diylc.components.misc.Label:Color</string>
@@ -193,7 +193,7 @@ public class Presenter implements IPlugInPort {
Project project = new Project();
instantiationManager.fillWithDefaultProperties(project);
loadProject(project, true);
projectFileManager.fireFileStatusChanged();
projectFileManager.startNewFile();
} catch (Exception e) {
LOG.error("Could not create new file", e);
view.showMessage("Could not create a new file. Check the log for details.", "Error",
@@ -77,6 +77,12 @@ public class ProjectFileManager {
xStream.autodetectAnnotations(true);
this.messageDispatcher = messageDispatcher;
}
public void startNewFile() {
currentFileName = null;
modified = false;
fireFileStatusChanged();
}
public void serializeProjectToFile(Project project, String fileName) throws IOException {
LOG.info(String.format("saveProjectToFile(%s)", fileName));