Better filtering of update sets for sheet and array

This commit is contained in:
Lars Brubaker 2021-10-06 18:44:31 -07:00
parent a1eb53ecfa
commit e9b2001eff
3 changed files with 47 additions and 12 deletions

View file

@ -96,6 +96,11 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
var updateItems = SheetObject3D.SortAndLockUpdateItems(this, (item) =>
{
if (!SheetObject3D.HasExpressionWithString(item, "[index]", false))
{
return false;
}
// WIP
if (item.Parent == this)
{
@ -108,6 +113,12 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
// Only process its children that are the source container (they will be replicated and modified correctly by the source container)
return item is OperationSourceObject3D;
}
else if (item.Parent is OperationSourceObject3D operationSourceObject3D
&& operationSourceObject3D.Parent == this)
{
// we don't need to rebuild our source object
return false;
}
// process everything else
return true;