Browse Source

优化 ReNameRecipe点击选择

jiangjy 1 month ago
parent
commit
55a1ce4bef

+ 2 - 2
Furnace/FurnaceUI/Views/Recipes/RecipeJobViewModel.cs

@@ -1361,11 +1361,11 @@ namespace FurnaceUI.Views.Recipes
             ProcessTypeFileItem item = ProcessTypeFileList.FirstOrDefault(x => x.ProcessType == CurrentProcessType);
             ProcessTypeFileItem item = ProcessTypeFileList.FirstOrDefault(x => x.ProcessType == CurrentProcessType);
             item.FileListByProcessType = RecipeSequenceTreeBuilder.GetFileNodeParameterList($"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}");// RecipeSequenceTreeBuilder.BuildFileNode(prefix, selectedFile, selectionIsFolder, recipes)[0].Files;
             item.FileListByProcessType = RecipeSequenceTreeBuilder.GetFileNodeParameterList($"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}");// RecipeSequenceTreeBuilder.BuildFileNode(prefix, selectedFile, selectionIsFolder, recipes)[0].Files;
             FindSelectedFile(item.FileListByProcessType, $"{$"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}"}\\{newName}");
             FindSelectedFile(item.FileListByProcessType, $"{$"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}"}\\{newName}");
-
+            TreeSelectChanged(CurrentFileNode);
             item.FileListByProcessType.ForEachDo(a =>
             item.FileListByProcessType.ForEachDo(a =>
             {
             {
                 a.IsSelected = false;
                 a.IsSelected = false;
-                if (a.FullPath == prefix)
+                if (a.FullPath == dialog.FilePath)
                 {
                 {
                     a.IsSelected = true;
                     a.IsSelected = true;
                     RecipeFileList = a.Files.ToList();
                     RecipeFileList = a.Files.ToList();

+ 2 - 2
Furnace/FurnaceUI/Views/Recipes/RecipeLayoutViewModel.cs

@@ -1369,11 +1369,11 @@ namespace FurnaceUI.Views.Recipes
             ProcessTypeFileItem item = ProcessTypeFileList.FirstOrDefault(x => x.ProcessType == CurrentProcessType);
             ProcessTypeFileItem item = ProcessTypeFileList.FirstOrDefault(x => x.ProcessType == CurrentProcessType);
             item.FileListByProcessType = RecipeSequenceTreeBuilder.GetFileNodeParameterList($"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}");// RecipeSequenceTreeBuilder.BuildFileNode(prefix, selectedFile, selectionIsFolder, recipes)[0].Files;
             item.FileListByProcessType = RecipeSequenceTreeBuilder.GetFileNodeParameterList($"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}");// RecipeSequenceTreeBuilder.BuildFileNode(prefix, selectedFile, selectionIsFolder, recipes)[0].Files;
             FindSelectedFile(item.FileListByProcessType, $"{$"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}"}\\{newName}");
             FindSelectedFile(item.FileListByProcessType, $"{$"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}"}\\{newName}");
-
+            TreeSelectChanged(CurrentFileNode);
             item.FileListByProcessType.ForEachDo(a =>
             item.FileListByProcessType.ForEachDo(a =>
             {
             {
                 a.IsSelected = false;
                 a.IsSelected = false;
-                if (a.FullPath == prefix)
+                if (a.FullPath == dialog.FilePath)
                 {
                 {
                     a.IsSelected = true;
                     a.IsSelected = true;
                     RecipeFileList = a.Files.ToList();
                     RecipeFileList = a.Files.ToList();

+ 2 - 2
Furnace/FurnaceUI/Views/Recipes/RecipeViewModel.cs

@@ -1430,11 +1430,11 @@ namespace FurnaceUI.Views.Recipes
             ProcessTypeFileItem item = ProcessTypeFileList.FirstOrDefault(x => x.ProcessType == CurrentProcessType);
             ProcessTypeFileItem item = ProcessTypeFileList.FirstOrDefault(x => x.ProcessType == CurrentProcessType);
             item.FileListByProcessType = RecipeSequenceTreeBuilder.GetFileNodeParameterList($"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}");// RecipeSequenceTreeBuilder.BuildFileNode(prefix, selectedFile, selectionIsFolder, recipes)[0].Files;
             item.FileListByProcessType = RecipeSequenceTreeBuilder.GetFileNodeParameterList($"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}");// RecipeSequenceTreeBuilder.BuildFileNode(prefix, selectedFile, selectionIsFolder, recipes)[0].Files;
             FindSelectedFile(item.FileListByProcessType, $"{$"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}"}\\{newName}");
             FindSelectedFile(item.FileListByProcessType, $"{$"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}"}\\{newName}");
-
+            TreeSelectChanged(CurrentFileNode);
             item.FileListByProcessType.ForEachDo(a =>
             item.FileListByProcessType.ForEachDo(a =>
             {
             {
                 a.IsSelected = false;
                 a.IsSelected = false;
-                if (a.FullPath == prefix)
+                if (a.FullPath == dialog.FilePath)
                 {
                 {
                     a.IsSelected = true;
                     a.IsSelected = true;
                     RecipeFileList = a.Files.ToList();
                     RecipeFileList = a.Files.ToList();