Profile tree - Fixed moving layers into folders leaving a copy behind

Profile tree - Added rename/delete hotkeys to elements
Profile tree - Moved dialogs to the tree panel
Layer properties - Auto-select transform tool when modifying transform properties
This commit is contained in:
Robert committed 2020-09-17 19:45:36 +02:00
1 parent 375c04090b
commit a3290c40f8
25 files changed
+239 -146

No files matched your search

+2 -2
View File
@@ -157,7 +157,7 @@ namespace Artemis.Core
Transform.GroupDescription = (PropertyGroupDescriptionAttribute) transformAttribute;
Transform.Initialize(this, "Transform.", Constants.CorePluginInfo);
General.ShapeType.BaseValueChanged += ShapeTypeOnBaseValueChanged;
General.ShapeType.CurrentValueSet += ShapeTypeOnCurrentValueSet;
ApplyShapeType();
ActivateLayerBrush();
}
@@ -213,7 +213,7 @@ namespace Artemis.Core
#region Shape management
private void ShapeTypeOnBaseValueChanged(object sender, EventArgs e)
private void ShapeTypeOnCurrentValueSet(object sender, EventArgs e)
{
ApplyShapeType();
}
@@ -15,7 +15,7 @@ namespace Artemis.Core
/// </para>
/// </summary>
/// <typeparam name="T">The type of property encapsulated in this layer property</typeparam>
public abstract class LayerProperty<T> : ILayerProperty
public class LayerProperty<T> : ILayerProperty
{
private bool _disposed;
@@ -120,8 +120,7 @@ namespace Artemis.Core
_baseValue = value;
Update(0);
OnBaseValueChanged();
LayerPropertyGroup.OnLayerPropertyBaseValueChanged(new LayerPropertyEventArgs(this));
OnCurrentValueSet();
}
}
@@ -165,6 +164,7 @@ namespace Artemis.Core
// Force an update so that the base value is applied to the current value and
// keyframes/data bindings are applied using the new base value
Update(0);
OnCurrentValueSet();
}
/// <summary>
@@ -534,9 +534,9 @@ namespace Artemis.Core
public event EventHandler<LayerPropertyEventArgs<T>> Updated;
/// <summary>
/// Occurs when the base value of the layer property was updated
/// Occurs when the current value of the layer property was updated by some form of input
/// </summary>
public event EventHandler<LayerPropertyEventArgs<T>> BaseValueChanged;
public event EventHandler<LayerPropertyEventArgs<T>> CurrentValueSet;
/// <summary>
/// Occurs when the <see cref="IsHidden" /> value of the layer property was updated
@@ -573,9 +573,10 @@ namespace Artemis.Core
Updated?.Invoke(this, new LayerPropertyEventArgs<T>(this));
}
protected virtual void OnBaseValueChanged()
protected virtual void OnCurrentValueSet()
{
BaseValueChanged?.Invoke(this, new LayerPropertyEventArgs<T>(this));
CurrentValueSet?.Invoke(this, new LayerPropertyEventArgs<T>(this));
LayerPropertyGroup.OnLayerPropertyOnCurrentValueSet(new LayerPropertyEventArgs(this));
}
protected virtual void OnVisibilityChanged()
@@ -274,10 +274,10 @@ namespace Artemis.Core
public event EventHandler PropertyGroupInitialized;
/// <summary>
/// Occurs when one of the base value of one of the layer properties in this group changes
/// Occurs when one of the current value of one of the layer properties in this group changes by some form of input
/// <para>Note: Will not trigger on properties in child groups</para>
/// </summary>
public event EventHandler<LayerPropertyEventArgs> LayerPropertyBaseValueChanged;
public event EventHandler<LayerPropertyEventArgs> LayerPropertyOnCurrentValueSet;
/// <summary>
/// Occurs when the <see cref="IsHidden" /> value of the layer property was updated
@@ -294,9 +294,9 @@ namespace Artemis.Core
VisibilityChanged?.Invoke(this, EventArgs.Empty);
}
internal virtual void OnLayerPropertyBaseValueChanged(LayerPropertyEventArgs e)
internal virtual void OnLayerPropertyOnCurrentValueSet(LayerPropertyEventArgs e)
{
LayerPropertyBaseValueChanged?.Invoke(this, e);
LayerPropertyOnCurrentValueSet?.Invoke(this, e);
}
#endregion