Profile editor - Don't confirm when deleting layers (we have undo)

Profile editor - Apply new brushes before saving to fix undo crash
This commit is contained in:
Robert committed 2020-12-16 22:39:46 +01:00
1 parent 7ffe8f3e5b
commit 3792dd53d2
2 files changed
+10 -23

No files matched your search

@@ -136,19 +136,16 @@ namespace Artemis.UI.Shared
Validate();
// Only apply the input value to the layer property if the validator found no errors
if (!HasErrors)
SetCurrentValue(_inputValue, !InputDragging);
{
OnInputValueChanged();
LayerProperty.SetCurrentValue(_inputValue, ProfileEditorService.CurrentTime);
OnInputValueApplied();
OnInputValueChanged();
OnInputValueApplied();
}
private void SetCurrentValue(T value, bool saveChanges)
{
LayerProperty.SetCurrentValue(value, ProfileEditorService.CurrentTime);
if (saveChanges)
ProfileEditorService.UpdateSelectedProfileElement();
else
ProfileEditorService.UpdateProfilePreview();
if (InputDragging)
ProfileEditorService.UpdateProfilePreview();
else
ProfileEditorService.UpdateSelectedProfileElement();
}
}
private void UpdateInputValue()