parent
04666ca896
commit
f84d2019ed
|
@ -126,9 +126,7 @@ namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel
|
|||
var changed = !IsSavedDesc;
|
||||
|
||||
if (!changed)
|
||||
{
|
||||
changed = ChkChanged(Steps) || ChkChanged(PopSettingSteps);
|
||||
}
|
||||
|
||||
if (!changed)
|
||||
{
|
||||
|
@ -643,29 +641,20 @@ namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel
|
|||
{
|
||||
_gasFlowCalculator?.Calculate(step, Module);
|
||||
}
|
||||
|
||||
|
||||
public bool ChkChanged(RecipeStepCollection steps)
|
||||
{
|
||||
foreach (var parameters in steps)
|
||||
{
|
||||
if (parameters.FirstOrDefault(param => param.IsSaved == false) != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
return steps.IsSaved == false;
|
||||
}
|
||||
|
||||
public bool ChkChanged(Dictionary<string, RecipeStepCollection> popSteps)
|
||||
{
|
||||
foreach (var parameters in popSteps.Values)
|
||||
foreach (var steps in popSteps.Values)
|
||||
{
|
||||
if (ChkChanged(parameters))
|
||||
{
|
||||
if (ChkChanged(steps))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -317,6 +317,9 @@ namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel
|
|||
|
||||
UpdateStepIndex();
|
||||
this[index].Validate();
|
||||
|
||||
// 强制标记为为保存状态
|
||||
IsSaved = false;
|
||||
}
|
||||
|
||||
protected override void RemoveItem(int index)
|
||||
|
@ -344,6 +347,9 @@ namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel
|
|||
base.RemoveItem(index);
|
||||
|
||||
UpdateStepIndex();
|
||||
|
||||
// 强制标记为为保存状态
|
||||
IsSaved = false;
|
||||
}
|
||||
|
||||
protected override void ClearItems()
|
||||
|
@ -365,6 +371,9 @@ namespace MECF.Framework.UI.Client.RecipeEditorLib.RecipeModel
|
|||
}
|
||||
|
||||
base.ClearItems();
|
||||
|
||||
// 强制标记为为保存状态
|
||||
IsSaved = false;
|
||||
}
|
||||
|
||||
protected override void MoveItem(int oldIndex, int newIndex)
|
||||
|
|
Loading…
Reference in New Issue