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:
parent
5a584cc6a4
commit
13c7ca93be
9 changed files with 27 additions and 176 deletions
|
|
@ -49,30 +49,7 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
public int Count { get; set; } = 3;
|
||||
public DirectionVector Direction { get; set; } = new DirectionVector { Normal = new Vector3(1, 0, 0) };
|
||||
public double Distance { get; set; } = 30;
|
||||
|
||||
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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue