making sure we don't re-enter this.OnInvalidate unless explicitly for properties
issue: MatterHackers/MCCentral#4965 Rebuild should directly call base.OnInvalidate to prevent re-entering this.OnInvalidate
This commit is contained in:
parent
5617739302
commit
563bd1a3e7
31 changed files with 48 additions and 49 deletions
|
|
@ -32,7 +32,6 @@ using ClipperLib;
|
|||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.DataConverters3D;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.DesignTools.Operations;
|
||||
|
||||
namespace MatterHackers.MatterControl.DesignTools.Operations
|
||||
{
|
||||
|
|
@ -58,7 +57,7 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
[Description("Change the width of the image lines.")]
|
||||
public double Inflate { get; set; }
|
||||
|
||||
public override void OnInvalidate(InvalidateArgs invalidateType)
|
||||
public override async void OnInvalidate(InvalidateArgs invalidateType)
|
||||
{
|
||||
if ((invalidateType.InvalidateType.HasFlag(InvalidateType.Children)
|
||||
|| invalidateType.InvalidateType.HasFlag(InvalidateType.Matrix)
|
||||
|
|
@ -66,12 +65,12 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
&& invalidateType.Source != this
|
||||
&& !RebuildLocked)
|
||||
{
|
||||
Rebuild();
|
||||
await Rebuild();
|
||||
}
|
||||
else if (invalidateType.InvalidateType.HasFlag(InvalidateType.Properties)
|
||||
&& invalidateType.Source == this)
|
||||
{
|
||||
Rebuild();
|
||||
await Rebuild();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -87,7 +86,7 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
InsetPath();
|
||||
}
|
||||
|
||||
Invalidate(InvalidateType.Path);
|
||||
Parent?.Invalidate(new InvalidateArgs(this, InvalidateType.Path));
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
DoSmoothing((long)(SmoothDistance * 1000), Iterations);
|
||||
|
||||
rebuildLock.Dispose();
|
||||
Invalidate(InvalidateType.Path);
|
||||
Parent?.Invalidate(new InvalidateArgs(this, InvalidateType.Path));
|
||||
return Task.CompletedTask;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue