|
@@ -548,6 +548,7 @@ namespace FurnaceUI.Views.Recipes
|
|
|
if (a.Name == node.Name)
|
|
|
{
|
|
|
a.IsSelected = true;
|
|
|
+ a.Files.ForEachDo(e => e.IsSelected = false);
|
|
|
RecipeFileList = a.Files.ToList();
|
|
|
return;
|
|
|
}
|
|
@@ -1107,14 +1108,13 @@ namespace FurnaceUI.Views.Recipes
|
|
|
public void SavePermission()
|
|
|
{
|
|
|
CurrentRecipe.Clear();
|
|
|
- var prefixPath = GetPrefix(CurrentFileNode.PrefixPath, CurrentFileNode);
|
|
|
- var recipeContent = _recipeProvider.LoadRecipe(CurrentRecipe.PrefixPath, CurrentFileNode.FullPath);
|
|
|
+ var recipeContent = _recipeProvider.LoadRecipe(CurrentFileNode.PrefixPath, CurrentFileNode.FullPath);
|
|
|
if (string.IsNullOrEmpty(recipeContent))
|
|
|
{
|
|
|
MessageBox.Show($"{CurrentRecipe.PrefixPath}\\{CurrentRecipe.Name} is empty, please confirm the file is valid.");
|
|
|
return;
|
|
|
}
|
|
|
- CurrentRecipe.InitData(prefixPath, CurrentRecipe.Name, recipeContent, _columnBuilder.Configs, SelectedChamber);
|
|
|
+ CurrentRecipe.InitData(CurrentFileNode.PrefixPath, CurrentFileNode.FullPath, recipeContent, _columnBuilder.Configs, SelectedChamber);
|
|
|
|
|
|
CurrentRecipe.RecipeLevel = CurrentFileNode.Level;
|
|
|
RecipePermissionSelectViewModel dialog = new RecipePermissionSelectViewModel("Save recipe and permission", CurrentFileNode.Permission, CurrentRecipe.Description);
|
|
@@ -1122,7 +1122,6 @@ namespace FurnaceUI.Views.Recipes
|
|
|
bool? dialogReturn = wm.ShowDialog(dialog);
|
|
|
if (!dialogReturn.HasValue || !dialogReturn.Value)
|
|
|
return;
|
|
|
- this.LoadData(CurrentRecipe.PrefixPath, CurrentRecipe.Name);
|
|
|
CurrentRecipe.RecipePermission = dialog.RecipePermission;
|
|
|
CurrentRecipe.Description = dialog.RecipeComment;
|
|
|
CurrentRecipe.RecipeLevel = CurrentFileNode.Level;
|
|
@@ -1132,10 +1131,11 @@ namespace FurnaceUI.Views.Recipes
|
|
|
item.FileListByProcessType = RecipeSequenceTreeBuilder.GetFileNodeParameterList($"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}");// RecipeSequenceTreeBuilder.BuildFileNode(prefix, selectedFile, selectionIsFolder, recipes)[0].Files;
|
|
|
FindSelectedFile(item.FileListByProcessType, $"{$"{ChamberType[ChamberTypeIndexSelection]}\\{item.ProcessType}"}\\{CurrentFileNode.FullPath}");
|
|
|
|
|
|
+ var prefixPath = GetPrefix(CurrentFileNode.PrefixPath, CurrentFileNode);
|
|
|
item.FileListByProcessType.ForEachDo(a =>
|
|
|
{
|
|
|
a.IsSelected = false;
|
|
|
- if (a.FullPath == CurrentRecipe.PrefixPath)
|
|
|
+ if (a.FullPath == prefixPath)
|
|
|
{
|
|
|
a.IsSelected = true;
|
|
|
RecipeFileList = a.Files.ToList();
|