Material Update Strategy was added

This commit is contained in:
Evgeny Redikultsev
2023-07-02 22:03:30 +05:00
parent 2595d7e733
commit 03b882f54d
74 changed files with 456 additions and 184 deletions

View File

@@ -50,13 +50,11 @@ namespace StructureHelper.Models.Materials
public object Clone()
{
IHeadMaterial material = new HeadMaterial
{
Name = Name,
Color = Color,
HelperMaterial = HelperMaterial.Clone() as IHelperMaterial
};
return material;
var newItem = new HeadMaterial();
newItem.HelperMaterial = this.HelperMaterial.Clone() as IHelperMaterial;
var updateStrategy = new MaterialUpdateStrategy();
updateStrategy.Update(newItem, this);
return newItem;
}
public void Save()