Undo History Reinitialization on Project Open/Creation
This commit is contained in:
@@ -128,6 +128,8 @@ namespace SpriteMapEditor
|
|||||||
|
|
||||||
private void newProjectMenuItem_Click(object sender, EventArgs e)
|
private void newProjectMenuItem_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
|
undoHistory = new History();
|
||||||
|
|
||||||
CurrentProjectFileLocation = null;
|
CurrentProjectFileLocation = null;
|
||||||
CurrentSpriteMapFileLocation = null;
|
CurrentSpriteMapFileLocation = null;
|
||||||
CurrentSpriteSheetFileLocation = null;
|
CurrentSpriteSheetFileLocation = null;
|
||||||
@@ -192,6 +194,8 @@ namespace SpriteMapEditor
|
|||||||
|
|
||||||
private void LoadProject()
|
private void LoadProject()
|
||||||
{
|
{
|
||||||
|
undoHistory = new History();
|
||||||
|
|
||||||
SpriteMapProject loadedProject;
|
SpriteMapProject loadedProject;
|
||||||
|
|
||||||
using (XmlReader xmlRead = XmlReader.Create(CurrentProjectFileLocation))
|
using (XmlReader xmlRead = XmlReader.Create(CurrentProjectFileLocation))
|
||||||
|
|||||||
Reference in New Issue
Block a user