mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Shared UI - Moved initialization code
Color picker - Added toggle to preview color on devices Settings - Added toggable auto-save
This commit is contained in:
1 parent
33373bda57
commit
fa329a9048
16 files changed
+276
-103
No files matched your search
+11
-5
@@ -205,17 +205,23 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings
|
||||
|
||||
private void UpdateTestResult()
|
||||
{
|
||||
if (Registration.DataBinding == null)
|
||||
if (Registration.DataBinding == null || ActiveItem == null)
|
||||
{
|
||||
TestInputValue.UpdateValue(default);
|
||||
TestResultValue.UpdateValue(default);
|
||||
return;
|
||||
}
|
||||
|
||||
var currentValue = Registration.Converter.ConvertFromObject(ActiveItem?.GetTestValue() ?? default(TProperty));
|
||||
|
||||
TestInputValue.UpdateValue(currentValue);
|
||||
TestResultValue.UpdateValue(Registration.DataBinding != null ? Registration.DataBinding.GetValue(currentValue) : default);
|
||||
if (ActiveItem.SupportsTestValue)
|
||||
{
|
||||
var currentValue = Registration.Converter.ConvertFromObject(ActiveItem?.GetTestValue() ?? default(TProperty));
|
||||
TestInputValue.UpdateValue(currentValue);
|
||||
TestResultValue.UpdateValue(Registration.DataBinding != null ? Registration.DataBinding.GetValue(currentValue) : default);
|
||||
}
|
||||
else
|
||||
{
|
||||
TestResultValue.UpdateValue(Registration.DataBinding != null ? Registration.DataBinding.GetValue(default) : default);
|
||||
}
|
||||
}
|
||||
|
||||
private void EnableDataBinding()
|
||||
|
||||
Reference in new issue
Block a user