mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-06-01 04:53:29 -05:00
UI is trying to update selectedIndex during reset. Don't allow that.
This commit is contained in:
parent
5f9eab3e4f
commit
afea210867
|
|
@ -23,7 +23,7 @@ namespace HavenSoft.HexManiac.Core.ViewModels.Tools {
|
|||
get => selectedVisibleIndex;
|
||||
set {
|
||||
if (value == -1) return;
|
||||
if (selectedVisibleIndex != value) {
|
||||
if (selectedVisibleIndex != value && !resetting) {
|
||||
selectedIndex = allOptions.IndexOf(Options[value]);
|
||||
ResetFilter();
|
||||
UpdateSelection?.Invoke(this, EventArgs.Empty);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using HavenSoft.HexManiac.Core;
|
||||
using HavenSoft.HexManiac.Core.Models;
|
||||
using HavenSoft.HexManiac.Core.Models.Runs;
|
||||
using HavenSoft.HexManiac.Core.ViewModels;
|
||||
using HavenSoft.HexManiac.Core.ViewModels.DataFormats;
|
||||
using HavenSoft.HexManiac.Core.ViewModels.Tools;
|
||||
using HavenSoft.HexManiac.Core.ViewModels.Visitors;
|
||||
|
|
@ -799,4 +800,11 @@ namespace HavenSoft.HexManiac.Tests {
|
|||
ViewPort.Goto.Execute("00");
|
||||
}
|
||||
}
|
||||
|
||||
public static class TableToolTestExtensions {
|
||||
public static FieldArrayElementViewModel GetField(this TableTool table, string name) {
|
||||
var child = table.Children.Single(vm => vm is FieldArrayElementViewModel fvm && fvm.Name == name);
|
||||
return (FieldArrayElementViewModel)child;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user