Finished anchor movement

Fixed a few issues when creating new layers
This commit is contained in:
SpoinkyNL committed 2020-01-22 23:22:50 +01:00
1 parent 20999919ab
commit 7966d3243c
5 files changed
+84 -75

No files matched your search

+4 -1
View File
@@ -153,7 +153,7 @@ namespace Artemis.Core.Models.Profile
public override void Render(double deltaTime, SKCanvas canvas)
{
if (Path == null)
if (Path == null || LayerShape == null)
return;
canvas.Save();
@@ -198,6 +198,9 @@ namespace Artemis.Core.Models.Profile
private SKPoint GetLayerAnchor(bool absolute)
{
if (LayerShape == null)
return SKPoint.Empty;
if (!absolute)
{
var anchor = AnchorPointProperty.CurrentValue;
@@ -11,7 +11,7 @@
public T Value
{
get => (T) BaseValue;
get => BaseValue != null ? (T) BaseValue : default;
set => BaseValue = value;
}
}