Make sure we send a content changed when we wrap an item with a transform
This commit is contained in:
parent
2be61bdb3e
commit
1bd51a8cbc
2 changed files with 12 additions and 10 deletions
|
|
@ -84,10 +84,10 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
{
|
||||
using (item.RebuilLockAll())
|
||||
{
|
||||
RebuildLock parentLock = null;
|
||||
RebuildLock itemLock = null;
|
||||
if (item.Parent != null)
|
||||
{
|
||||
parentLock = item.Parent.RebuildLock();
|
||||
itemLock = item.Parent.RebuildLock();
|
||||
}
|
||||
|
||||
if (item is SelectionGroupObject3D)
|
||||
|
|
@ -129,8 +129,10 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
this.Children.Add(firstChild);
|
||||
}
|
||||
|
||||
parentLock?.Dispose();
|
||||
itemLock?.Dispose();
|
||||
}
|
||||
|
||||
item.Parent?.Invalidate(new InvalidateArgs(item, InvalidateType.Content));
|
||||
}
|
||||
|
||||
public override void Flatten(UndoBuffer undoBuffer)
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ using MatterHackers.DataConverters3D;
|
|||
using MatterHackers.Localizations;
|
||||
using MatterHackers.VectorMath;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MatterHackers.MatterControl.DesignTools.Operations
|
||||
{
|
||||
|
|
@ -85,20 +86,18 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
&& invalidateType.Source != this
|
||||
&& !RebuildLocked)
|
||||
{
|
||||
Rebuild(null);
|
||||
Rebuild();
|
||||
}
|
||||
else if (invalidateType.InvalidateType == InvalidateType.Properties
|
||||
&& invalidateType.Source == this)
|
||||
{
|
||||
Rebuild(null);
|
||||
}
|
||||
else
|
||||
{
|
||||
base.OnInvalidate(invalidateType);
|
||||
Rebuild();
|
||||
}
|
||||
|
||||
base.OnInvalidate(invalidateType);
|
||||
}
|
||||
|
||||
private void Rebuild(UndoBuffer undoBuffer)
|
||||
public override Task Rebuild()
|
||||
{
|
||||
this.DebugDepth("Rebuild");
|
||||
|
||||
|
|
@ -109,6 +108,7 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
}
|
||||
|
||||
Invalidate(new InvalidateArgs(this, InvalidateType.Matrix, null));
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue