mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
fixed bug with file name when creating new file
This commit is contained in:
@@ -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>
|
||||
|
||||
+1
-1
@@ -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",
|
||||
|
||||
+6
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user