mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-10-02 13:16:35 -05:00
fix a crash if you try to use back/forward from a search tab.
This commit is contained in:
@@ -55,15 +55,15 @@ namespace HavenSoft.Gen3Hex.Core.ViewModels {
|
||||
}
|
||||
public string Name { get; }
|
||||
public string FileName => string.Empty;
|
||||
public ICommand Save => null;
|
||||
public ICommand SaveAs => null;
|
||||
public ICommand Undo => null;
|
||||
public ICommand Redo => null;
|
||||
public ICommand Copy => null;
|
||||
public ICommand Clear => null;
|
||||
public ICommand Goto => null;
|
||||
public ICommand Back => null;
|
||||
public ICommand Forward => null;
|
||||
public ICommand Save { get; } = new StubCommand();
|
||||
public ICommand SaveAs { get; } = new StubCommand();
|
||||
public ICommand Undo { get; } = new StubCommand();
|
||||
public ICommand Redo { get; } = new StubCommand();
|
||||
public ICommand Copy { get; } = new StubCommand();
|
||||
public ICommand Clear { get; } = new StubCommand();
|
||||
public ICommand Goto { get; } = new StubCommand();
|
||||
public ICommand Back { get; } = new StubCommand();
|
||||
public ICommand Forward { get; } = new StubCommand();
|
||||
public ICommand Close => close;
|
||||
|
||||
public IModel Model => null;
|
||||
|
||||
@@ -142,6 +142,13 @@ namespace HavenSoft.Gen3Hex.Tests {
|
||||
Assert.Equal("000A00", viewPort.Headers[0]);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CannotBackFromSearchTab() {
|
||||
var searchTab = new SearchResultsViewPort("bob");
|
||||
Assert.False(searchTab.Back.CanExecute(null));
|
||||
Assert.False(searchTab.Forward.CanExecute(null));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void BackRecallsYourLastScrollPosition() {
|
||||
var viewPort = new ViewPort(new LoadedFile("test.txt", new byte[0x1000])) { Width = 0x10, Height = 0x10 };
|
||||
|
||||
Reference in New Issue
Block a user