mirror of
https://github.com/haven1433/HexManiacAdvance.git
synced 2026-06-02 21:45:13 -05:00
fix broken tests
This commit is contained in:
parent
2379814133
commit
edd2ee1c36
|
|
@ -203,8 +203,13 @@ namespace HavenSoft.HexManiac.Core.ViewModels.Tools {
|
|||
|
||||
var (start, end) = (selection.Scroll.ViewPointToDataIndex(selection.SelectionStart), selection.Scroll.ViewPointToDataIndex(selection.SelectionEnd));
|
||||
var array = (ITableRun)model.GetNextRun(address);
|
||||
start -= array.ElementLength;
|
||||
end -= array.ElementLength;
|
||||
if (array.Start <= start && start < array.Start + array.Length && array.Start <= end && end < array.Start + array.Length) {
|
||||
start -= array.ElementLength;
|
||||
end -= array.ElementLength;
|
||||
} else {
|
||||
start = address - array.ElementLength;
|
||||
end = address - 1;
|
||||
}
|
||||
selection.SelectionStart = selection.Scroll.DataIndexToViewPoint(start);
|
||||
selection.SelectionEnd = selection.Scroll.DataIndexToViewPoint(end);
|
||||
}
|
||||
|
|
@ -222,8 +227,13 @@ namespace HavenSoft.HexManiac.Core.ViewModels.Tools {
|
|||
|
||||
var (start, end) = (selection.Scroll.ViewPointToDataIndex(selection.SelectionStart), selection.Scroll.ViewPointToDataIndex(selection.SelectionEnd));
|
||||
var array = (ITableRun)model.GetNextRun(address);
|
||||
start += array.ElementLength;
|
||||
end += array.ElementLength;
|
||||
if (array.Start <= start && start < array.Start + array.Length && array.Start <= end && end < array.Start + array.Length) {
|
||||
start += array.ElementLength;
|
||||
end += array.ElementLength;
|
||||
} else {
|
||||
start = address + array.ElementLength;
|
||||
end = address + array.ElementLength * 2 - 1;
|
||||
}
|
||||
selection.SelectionStart = selection.Scroll.DataIndexToViewPoint(start);
|
||||
selection.SelectionEnd = selection.Scroll.DataIndexToViewPoint(end);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace HavenSoft.HexManiac.Integration {
|
|||
}
|
||||
|
||||
[SkippableFact]
|
||||
public void BrockScript_ExpandSelection_EntireScriptSelected() {
|
||||
public void BrockScript_ExpandSelection_MultipleSectionsSelected() {
|
||||
var firered = LoadReadOnlyFireRed();
|
||||
firered.Goto.Execute("data.maps.banks/6/maps/2/map/0/events/0/objects/0/script/");
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ namespace HavenSoft.HexManiac.Integration {
|
|||
var firstAddress = firered.ConvertViewPointToAddress(firered.SelectionStart);
|
||||
var lastAddress = firered.ConvertViewPointToAddress(firered.SelectionEnd);
|
||||
var length = lastAddress - firstAddress + 1;
|
||||
Assert.Equal(171, length);
|
||||
Assert.Equal(95, length);
|
||||
}
|
||||
|
||||
[SkippableFact]
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@
|
|||
del "$(TargetDir)Models\Code\*.toml"
|
||||
copy "$(TargetDir)Models\Code\*.hma" "$(TargetDir)resources"
|
||||
del "$(TargetDir)Models\Code\*.hma"
|
||||
copy "$(TargetDir)Models\Code\*.py" "$(TargetDir)resources"
|
||||
del "$(TargetDir)Models\Code\*.py"
|
||||
copy "$(SolutionDir)src\HexManiac.WPF\Scripts\*.hma" "$(TargetDir)resources\Scripts"
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
|
|
@ -61,6 +61,8 @@
|
|||
del "$(TargetDir)Models\Code\*.toml"
|
||||
copy "$(TargetDir)Models\Code\*.hma" "$(TargetDir)resources"
|
||||
del "$(TargetDir)Models\Code\*.hma"
|
||||
copy "$(TargetDir)Models\Code\*.py" "$(TargetDir)resources"
|
||||
del "$(TargetDir)Models\Code\*.py"
|
||||
copy "$(SolutionDir)src\HexManiac.WPF\Scripts\*.hma" "$(TargetDir)resources\Scripts"
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user