mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
fix: 修复基建排版表数量为为0时引起的崩溃问题
This commit is contained in:
@@ -2645,6 +2645,11 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
{
|
||||
get
|
||||
{
|
||||
if (CustomInfrastPlanInfoList.Count == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (_customInfrastPlanIndex >= CustomInfrastPlanInfoList.Count || _customInfrastPlanIndex < 0)
|
||||
{
|
||||
CustomInfrastPlanIndex = _customInfrastPlanIndex;
|
||||
@@ -2654,7 +2659,11 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value >= CustomInfrastPlanInfoList.Count || value < 0)
|
||||
if (CustomInfrastPlanInfoList.Count == 0)
|
||||
{
|
||||
value = 0;
|
||||
}
|
||||
else if (value >= CustomInfrastPlanInfoList.Count || value < 0)
|
||||
{
|
||||
var count = CustomInfrastPlanInfoList.Count;
|
||||
value = (value % count + count) % count;
|
||||
|
||||
Reference in New Issue
Block a user