Updated animation callback
Working on fixed string
This commit is contained in:
parent
37322632a9
commit
ce5ad5f687
5 changed files with 23 additions and 5 deletions
|
|
@ -320,7 +320,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage
|
|||
Padding = new BorderDouble(2),
|
||||
Border = new BorderDouble(1),
|
||||
BorderColor = theme.Colors.PrimaryAccentColor,
|
||||
VAnchor = VAnchor.Center | VAnchor.Fit
|
||||
VAnchor = VAnchor.Center | VAnchor.Fit,
|
||||
};
|
||||
blueBox.AddChild(new TextWidget("64", pointSize: 8, textColor: theme.Colors.PrimaryAccentColor));
|
||||
|
||||
|
|
|
|||
|
|
@ -170,6 +170,7 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
}
|
||||
}
|
||||
|
||||
[HideUpdateButtonAttribute]
|
||||
public class Align3D : Object3D, IRebuildable, IPropertyGridModifier
|
||||
{
|
||||
// We need to serialize this so we can remove the arrange and get back to the objects before arranging
|
||||
|
|
@ -318,8 +319,19 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
return positionToAlignTo + extraOffset;
|
||||
}
|
||||
|
||||
bool inRebuild;
|
||||
protected override void OnInvalidate()
|
||||
{
|
||||
if (!inRebuild)
|
||||
{
|
||||
Rebuild(null);
|
||||
}
|
||||
base.OnInvalidate();
|
||||
}
|
||||
|
||||
public void Rebuild(UndoBuffer undoBuffer)
|
||||
{
|
||||
inRebuild = true;
|
||||
var aabb = this.GetAxisAlignedBoundingBox();
|
||||
|
||||
// TODO: check if the has code for the children
|
||||
|
|
@ -337,6 +349,10 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
var currentChildrenBounds = CurrentChildrenBounds;
|
||||
this.Children.Modify(list =>
|
||||
{
|
||||
if(list.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var firstBounds = currentChildrenBounds[0];
|
||||
int i = 0;
|
||||
foreach (var child in list)
|
||||
|
|
@ -402,6 +418,8 @@ namespace MatterHackers.MatterControl.DesignTools.Operations
|
|||
i++;
|
||||
}
|
||||
});
|
||||
|
||||
inRebuild = false;
|
||||
}
|
||||
|
||||
public override void Remove(UndoBuffer undoBuffer)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ namespace MatterHackers.MatterControl.DesignTools
|
|||
{
|
||||
public CubeObject3D()
|
||||
{
|
||||
Name = "Cylinder".Localize();
|
||||
Name = "Cube".Localize();
|
||||
Color = ApplicationController.Instance.PrimitiveColors["Cube"];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
internal double animationRatio = 0;
|
||||
internal double finalRadius = 22 * GuiWidget.DeviceScale;
|
||||
|
||||
public override void OnUpdate(double secondsThisUpdate)
|
||||
public override bool OnUpdate(UpdateEvent updateEvent)
|
||||
{
|
||||
if (IsRunning)
|
||||
{
|
||||
|
|
@ -54,7 +54,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
Stop();
|
||||
}
|
||||
|
||||
base.OnUpdate(secondsThisUpdate);
|
||||
return base.OnUpdate(updateEvent);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 632bb7520408493d6043e0a57a8b60f8326bda0b
|
||||
Subproject commit f19919b29f82e37f788267f458fdcc5e08309642
|
||||
Loading…
Add table
Add a link
Reference in a new issue