Common invalidate for all operations source objects

issue: MatterHackers/MCCentral#4941
changing color of inner object of curve not updating on screen color
This commit is contained in:
LarsBrubaker 2019-01-28 07:53:38 -08:00
parent 5a584cc6a4
commit 13c7ca93be
9 changed files with 27 additions and 176 deletions

View file

@ -57,29 +57,6 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
public bool ScaleOffset { get; set; } = true;
public override async void OnInvalidate(InvalidateArgs invalidateType)
{
if ((invalidateType.InvalidateType == InvalidateType.Content
|| invalidateType.InvalidateType == InvalidateType.Matrix
|| invalidateType.InvalidateType == InvalidateType.Mesh)
&& invalidateType.Source != this
&& !RebuildLocked)
{
await Rebuild();
base.OnInvalidate(new InvalidateArgs(this, InvalidateType.Content, invalidateType.UndoBuffer));
}
else if (invalidateType.InvalidateType == InvalidateType.Properties
&& invalidateType.Source == this)
{
await Rebuild();
base.OnInvalidate(new InvalidateArgs(this, InvalidateType.Content, invalidateType.UndoBuffer));
}
else
{
base.OnInvalidate(invalidateType);
}
}
public override async Task Rebuild()
{
var rebuildLock = this.RebuildLock();