mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Editor - Don't call ApplyUpdateValue if nothing changed
Draggable number box - Fix values resetting to 1
This commit is contained in:
parent
d114c37439
commit
bd26f447c6
@ -21,7 +21,7 @@ namespace Artemis.Core
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the property already matches the desirec value or needs to be updated.
|
||||
/// Checks if the property already matches the desired value or needs to be updated.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">Type of the property.</typeparam>
|
||||
/// <param name="storage">Reference to the backing-filed.</param>
|
||||
|
||||
@ -24,12 +24,12 @@ public class DraggableNumberBox : UserControl
|
||||
/// <summary>
|
||||
/// Defines the <see cref="Minimum" /> property.
|
||||
/// </summary>
|
||||
public static readonly StyledProperty<double> MinimumProperty = AvaloniaProperty.Register<DraggableNumberBox, double>(nameof(Minimum), double.MinValue);
|
||||
public static readonly StyledProperty<double> MinimumProperty = AvaloniaProperty.Register<DraggableNumberBox, double>(nameof(Minimum));
|
||||
|
||||
/// <summary>
|
||||
/// Defines the <see cref="Maximum" /> property.
|
||||
/// </summary>
|
||||
public static readonly StyledProperty<double> MaximumProperty = AvaloniaProperty.Register<DraggableNumberBox, double>(nameof(Maximum), double.MaxValue);
|
||||
public static readonly StyledProperty<double> MaximumProperty = AvaloniaProperty.Register<DraggableNumberBox, double>(nameof(Maximum));
|
||||
|
||||
/// <summary>
|
||||
/// Defines the <see cref="LargeChange" /> property.
|
||||
|
||||
@ -95,6 +95,9 @@ public abstract class PropertyInputViewModel<T> : PropertyInputViewModel
|
||||
get => _inputValue;
|
||||
set
|
||||
{
|
||||
if (Equals(_inputValue, value))
|
||||
return;
|
||||
|
||||
this.RaiseAndSetIfChanged(ref _inputValue, value);
|
||||
ApplyInputValue();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user