update text tool after undo

This commit is contained in:
Benjamin Popp 2021-07-24 22:01:04 -05:00
parent 24490c43e9
commit bec3d66159
2 changed files with 11 additions and 0 deletions

View File

@ -126,6 +126,7 @@ namespace HavenSoft.HexManiac.Core.ViewModels.Tools {
}
public void RefreshContent() {
StringTool.DataForCurrentRunChanged();
TableTool.DataForCurrentRunChanged();
SpriteTool.DataForCurrentRunChanged();
}

View File

@ -365,5 +365,15 @@ namespace HavenSoft.HexManiac.Tests {
Assert.True(watcher.LastCanExecute);
}
[Fact]
public void ChangeTextWithTextTool_Undo_TextToolUpdates() {
ViewPort.Edit("FF @00 ^text\"\" Test\" @00 ");
ViewPort.Tools.StringTool.Content = "Blah";
ViewPort.Undo.Execute();
Assert.Equal("Test", ViewPort.Tools.StringTool.Content);
}
}
}