Defer sort seed checks until adjust-order startup
This commit is contained in:
@@ -33,6 +33,7 @@ namespace DrillTools
|
||||
private double _minEADiameter;
|
||||
private bool _isStartupDrillTapeFile;
|
||||
private bool _canGeneratePpDrillTape;
|
||||
private bool _shouldCheckSortFileOnLoad = true;
|
||||
|
||||
private const int SwRestore = 9;
|
||||
private const int SvsiSelect = 0x1;
|
||||
@@ -164,6 +165,15 @@ namespace DrillTools
|
||||
private set => SetProperty(ref _canGeneratePpDrillTape, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 加载钻带后是否自动检查同目录排序种子文件。
|
||||
/// </summary>
|
||||
public bool ShouldCheckSortFileOnLoad
|
||||
{
|
||||
get => _shouldCheckSortFileOnLoad;
|
||||
set => SetProperty(ref _shouldCheckSortFileOnLoad, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 窗口是否置顶
|
||||
/// </summary>
|
||||
@@ -328,8 +338,8 @@ namespace DrillTools
|
||||
// 计算并更新最小直径信息
|
||||
UpdateMinDiameterInfo();
|
||||
|
||||
// 检查并应用-sort.txt文件中的刀具排序
|
||||
if (!string.IsNullOrEmpty(OriginalFilePath))
|
||||
// 启动菜单的预检查和非调整刀序动作会关闭此开关,避免排序提示抢在菜单前弹出。
|
||||
if (ShouldCheckSortFileOnLoad && !string.IsNullOrEmpty(OriginalFilePath))
|
||||
{
|
||||
CheckAndApplySortFile(OriginalFilePath, Tools);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user