better rebuilding for images and sheets
This commit is contained in:
parent
73b964758c
commit
6e7e0feb21
7 changed files with 66 additions and 45 deletions
|
|
@ -32,6 +32,7 @@ using System.Collections.Generic;
|
|||
using System.ComponentModel;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using CsvHelper;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Agg.VertexSource;
|
||||
using MatterHackers.DataConverters3D;
|
||||
|
|
@ -107,23 +108,27 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
Name = "Linear Extrude".Localize();
|
||||
}
|
||||
|
||||
public override async void OnInvalidate(InvalidateArgs eventArgs)
|
||||
public override async void OnInvalidate(InvalidateArgs invalidateArgs)
|
||||
{
|
||||
if ((eventArgs.InvalidateType.HasFlag(InvalidateType.Path)
|
||||
|| eventArgs.InvalidateType.HasFlag(InvalidateType.Children))
|
||||
&& eventArgs.Source != this
|
||||
if ((invalidateArgs.InvalidateType.HasFlag(InvalidateType.Path)
|
||||
|| invalidateArgs.InvalidateType.HasFlag(InvalidateType.Children))
|
||||
&& invalidateArgs.Source != this
|
||||
&& !RebuildLocked)
|
||||
{
|
||||
await Rebuild();
|
||||
}
|
||||
else if (eventArgs.InvalidateType.HasFlag(InvalidateType.Properties)
|
||||
&& eventArgs.Source == this)
|
||||
else if (invalidateArgs.InvalidateType.HasFlag(InvalidateType.Properties)
|
||||
&& invalidateArgs.Source == this)
|
||||
{
|
||||
await Rebuild();
|
||||
}
|
||||
else
|
||||
{
|
||||
base.OnInvalidate(eventArgs);
|
||||
else if (SheetObject3D.NeedsRebuild(this, invalidateArgs))
|
||||
{
|
||||
await Rebuild();
|
||||
}
|
||||
else
|
||||
{
|
||||
base.OnInvalidate(invalidateArgs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -100,23 +100,23 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
Name = "Revolve".Localize();
|
||||
}
|
||||
|
||||
public override async void OnInvalidate(InvalidateArgs eventArgs)
|
||||
public override async void OnInvalidate(InvalidateArgs invalidateArgs)
|
||||
{
|
||||
if ((eventArgs.InvalidateType.HasFlag(InvalidateType.Path)
|
||||
|| eventArgs.InvalidateType.HasFlag(InvalidateType.Children))
|
||||
&& eventArgs.Source != this
|
||||
if ((invalidateArgs.InvalidateType.HasFlag(InvalidateType.Path)
|
||||
|| invalidateArgs.InvalidateType.HasFlag(InvalidateType.Children))
|
||||
&& invalidateArgs.Source != this
|
||||
&& !RebuildLocked)
|
||||
{
|
||||
await Rebuild();
|
||||
}
|
||||
else if (eventArgs.InvalidateType.HasFlag(InvalidateType.Properties)
|
||||
&& eventArgs.Source == this)
|
||||
else if (invalidateArgs.InvalidateType.HasFlag(InvalidateType.Properties)
|
||||
&& invalidateArgs.Source == this)
|
||||
{
|
||||
await Rebuild();
|
||||
}
|
||||
else
|
||||
{
|
||||
base.OnInvalidate(eventArgs);
|
||||
base.OnInvalidate(invalidateArgs);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue