Undo and Redo Operations Functional, with some caveats
This commit is contained in:
@@ -16,6 +16,9 @@ namespace SpriteMapEditor.SpriteMapModifications
|
||||
|
||||
private readonly SpriteMapRegion removedSprite;
|
||||
|
||||
private List<int> preChangeSelection;
|
||||
private List<int> postChangeSelection;
|
||||
|
||||
public RemoveSprite(BindingList<SpriteMapRegion> spriteList, int indexToRemove)
|
||||
{
|
||||
allSprites = spriteList;
|
||||
@@ -32,5 +35,27 @@ namespace SpriteMapEditor.SpriteMapModifications
|
||||
{
|
||||
allSprites.Insert(index, removedSprite);
|
||||
}
|
||||
|
||||
public List<int> GetPreChangeSelection()
|
||||
{
|
||||
return preChangeSelection;
|
||||
}
|
||||
public void SetPreChangeSelection(List<int> currentSelection)
|
||||
{
|
||||
preChangeSelection = currentSelection;
|
||||
}
|
||||
public List<int> GetPostChangeSelection()
|
||||
{
|
||||
return postChangeSelection;
|
||||
}
|
||||
public void SetPostChangeSelection(List<int> currentSelection)
|
||||
{
|
||||
postChangeSelection = currentSelection;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return "Remove Sprite";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user