修正Recipe编辑器中,当新建Recipe后,Recipe不为空,而是保留刚才打开的Recipe内容的问题。

This commit is contained in:
auvkk 2023-12-06 18:25:14 +08:00
parent a94555b1a9
commit 4946707523
1 changed files with 2 additions and 2 deletions

View File

@ -1458,7 +1458,7 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Recipe
return false;
}
if (CurrentRecipe.Validate() == false)
if (recipe.Validate() == false)
{
var mbr = DialogBox.ShowDialog(
DialogButton.Yes | DialogButton.No,
@ -1472,7 +1472,7 @@ namespace MECF.Framework.UI.Client.CenterViews.Editors.Recipe
recipe.Revisor = BaseApp.Instance.UserContext.LoginName;
recipe.ReviseTime = DateTime.Now;
if (!CurrentRecipe.GetXmlString(out var recipeXmlString, out var reason))
if (!recipe.GetXmlString(out var recipeXmlString, out var reason))
{
DialogBox.ShowError($"Unable to generate recipe content, {reason}");
return false;