mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 09:12:09 +10:00
fixed bug with file name when creating new file
This commit is contained in:
@@ -1,15 +1,15 @@
|
|||||||
<map>
|
<map>
|
||||||
<entry>
|
<entry>
|
||||||
<string>metric</string>
|
<string>lastPath</string>
|
||||||
<boolean>true</boolean>
|
<string>C:\Documents and Settings\Branislav Stojkovic\Desktop</string>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<string>zoom</string>
|
<string>zoom</string>
|
||||||
<double>1.0</double>
|
<double>1.0</double>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<string>lastPath</string>
|
<string>metric</string>
|
||||||
<string>C:\Documents and Settings\Branislav Stojkovic\Desktop</string>
|
<boolean>true</boolean>
|
||||||
</entry>
|
</entry>
|
||||||
<entry>
|
<entry>
|
||||||
<string>default.org.diylc.components.misc.Label:Color</string>
|
<string>default.org.diylc.components.misc.Label:Color</string>
|
||||||
|
|||||||
+1
-1
@@ -193,7 +193,7 @@ public class Presenter implements IPlugInPort {
|
|||||||
Project project = new Project();
|
Project project = new Project();
|
||||||
instantiationManager.fillWithDefaultProperties(project);
|
instantiationManager.fillWithDefaultProperties(project);
|
||||||
loadProject(project, true);
|
loadProject(project, true);
|
||||||
projectFileManager.fireFileStatusChanged();
|
projectFileManager.startNewFile();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOG.error("Could not create new file", e);
|
LOG.error("Could not create new file", e);
|
||||||
view.showMessage("Could not create a new file. Check the log for details.", "Error",
|
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);
|
xStream.autodetectAnnotations(true);
|
||||||
this.messageDispatcher = messageDispatcher;
|
this.messageDispatcher = messageDispatcher;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void startNewFile() {
|
||||||
|
currentFileName = null;
|
||||||
|
modified = false;
|
||||||
|
fireFileStatusChanged();
|
||||||
|
}
|
||||||
|
|
||||||
public void serializeProjectToFile(Project project, String fileName) throws IOException {
|
public void serializeProjectToFile(Project project, String fileName) throws IOException {
|
||||||
LOG.info(String.format("saveProjectToFile(%s)", fileName));
|
LOG.info(String.format("saveProjectToFile(%s)", fileName));
|
||||||
|
|||||||
Reference in New Issue
Block a user