diff --git a/src/Artemis.Core/Models/Profile/Conditions/Abstract/DataModelConditionPredicate.cs b/src/Artemis.Core/Models/Profile/Conditions/Abstract/DataModelConditionPredicate.cs index 0b4b5cb03..f99364cd2 100644 --- a/src/Artemis.Core/Models/Profile/Conditions/Abstract/DataModelConditionPredicate.cs +++ b/src/Artemis.Core/Models/Profile/Conditions/Abstract/DataModelConditionPredicate.cs @@ -293,6 +293,10 @@ namespace Artemis.Core if (Operator == null || LeftPath == null || !LeftPath.IsValid) return false; + // If the operator does not support a right side, immediately evaluate with null + if (Operator.RightSideType == null) + return Operator.InternalEvaluate(LeftPath.GetValue(), null); + // Compare with a static value if (PredicateType == ProfileRightSideType.Static) { diff --git a/src/Artemis.Core/Models/Profile/Conditions/DataModelConditionEventPredicate.cs b/src/Artemis.Core/Models/Profile/Conditions/DataModelConditionEventPredicate.cs index 97e8ad1fb..4e5f38d02 100644 --- a/src/Artemis.Core/Models/Profile/Conditions/DataModelConditionEventPredicate.cs +++ b/src/Artemis.Core/Models/Profile/Conditions/DataModelConditionEventPredicate.cs @@ -55,11 +55,14 @@ namespace Artemis.Core private object? GetEventPathValue(DataModelPath path, object target) { - if (!(path.Target is EventPredicateWrapperDataModel wrapper)) - throw new ArtemisCoreException("Data model condition event predicate has a path with an invalid target"); + lock (path) + { + if (!(path.Target is EventPredicateWrapperDataModel wrapper)) + throw new ArtemisCoreException("Data model condition event predicate has a path with an invalid target"); - wrapper.UntypedArguments = target; - return path.GetValue(); + wrapper.UntypedArguments = target; + return path.GetValue(); + } } #region Initialization @@ -124,6 +127,10 @@ namespace Artemis.Core if (Operator == null || LeftPath == null || !LeftPath.IsValid) return false; + // If the operator does not support a right side, immediately evaluate with null + if (Operator.RightSideType == null) + return Operator.InternalEvaluate(GetEventPathValue(LeftPath, target), null); + // Compare with a static value if (PredicateType == ProfileRightSideType.Static) { diff --git a/src/Artemis.Core/Models/Profile/DataBindings/DataBinding.cs b/src/Artemis.Core/Models/Profile/DataBindings/DataBinding.cs index a03212697..f62920e14 100644 --- a/src/Artemis.Core/Models/Profile/DataBindings/DataBinding.cs +++ b/src/Artemis.Core/Models/Profile/DataBindings/DataBinding.cs @@ -60,9 +60,9 @@ namespace Artemis.Core /// Gets ors ets the easing function of the data binding /// public Easings.Functions EasingFunction { get; set; } - + internal DataBindingEntity Entity { get; } - + /// /// Gets the current value of the data binding /// @@ -139,16 +139,24 @@ namespace Artemis.Core /// /// The timeline to apply during update public void Update(Timeline timeline) + { + UpdateWithDelta(timeline.Delta); + } + + /// + /// Updates the smoothing progress of the data binding + /// + /// The delta to apply during update + public void UpdateWithDelta(TimeSpan delta) { if (_disposed) throw new ObjectDisposedException("DataBinding"); // Data bindings cannot go back in time like brushes - TimeSpan deltaTime = timeline.Delta; - if (deltaTime < TimeSpan.Zero) - deltaTime = TimeSpan.Zero; + if (delta < TimeSpan.Zero) + delta = TimeSpan.Zero; - _easingProgress = _easingProgress.Add(deltaTime); + _easingProgress = _easingProgress.Add(delta); if (_easingProgress > EasingTime) _easingProgress = EasingTime; } diff --git a/src/Artemis.Core/Models/Profile/LayerProperties/LayerProperty.cs b/src/Artemis.Core/Models/Profile/LayerProperties/LayerProperty.cs index cdc7f9aa4..39a18a503 100644 --- a/src/Artemis.Core/Models/Profile/LayerProperties/LayerProperty.cs +++ b/src/Artemis.Core/Models/Profile/LayerProperties/LayerProperty.cs @@ -42,10 +42,8 @@ namespace Artemis.Core CurrentValue = BaseValue; - if (ProfileElement.ApplyKeyframesEnabled) - UpdateKeyframes(timeline); - if (ProfileElement.ApplyDataBindingsEnabled) - UpdateDataBindings(timeline); + UpdateKeyframes(timeline); + UpdateDataBindings(timeline); OnUpdated(); } @@ -421,6 +419,10 @@ namespace Artemis.Core private void UpdateDataBindings(Timeline timeline) { + // To avoid data bindings applying at non-regular updating (during editing) only update when not overriden + if (timeline.IsOverridden) + return; + foreach (IDataBinding dataBinding in _dataBindings) { dataBinding.Update(timeline); diff --git a/src/Artemis.Core/Models/Profile/RenderProfileElement.cs b/src/Artemis.Core/Models/Profile/RenderProfileElement.cs index dc0cb5508..27fe3246d 100644 --- a/src/Artemis.Core/Models/Profile/RenderProfileElement.cs +++ b/src/Artemis.Core/Models/Profile/RenderProfileElement.cs @@ -15,8 +15,6 @@ namespace Artemis.Core { protected RenderProfileElement() { - ApplyDataBindingsEnabled = true; - ApplyKeyframesEnabled = true; Timeline = new Timeline(); LayerEffectStore.LayerEffectAdded += LayerEffectStoreOnLayerEffectAdded; @@ -300,16 +298,6 @@ namespace Artemis.Core set => SetAndNotify(ref _displayCondition, value); } - /// - /// Gets or sets whether keyframes should be applied when this profile element updates - /// - public bool ApplyKeyframesEnabled { get; set; } - - /// - /// Gets or sets whether data bindings should be applied when this profile element updates - /// - public bool ApplyDataBindingsEnabled { get; set; } - /// /// Evaluates the display conditions on this element and applies any required changes to the /// diff --git a/src/Artemis.Core/Models/Profile/Timeline.cs b/src/Artemis.Core/Models/Profile/Timeline.cs index ee77e3b32..6397b34c9 100644 --- a/src/Artemis.Core/Models/Profile/Timeline.cs +++ b/src/Artemis.Core/Models/Profile/Timeline.cs @@ -137,6 +137,11 @@ namespace Artemis.Core /// public bool IsFinished => Position > Length || Length == TimeSpan.Zero; + /// + /// Gets a boolean indicating whether the timeline progress has been overridden + /// + public bool IsOverridden { get; private set; } + #region Segments /// @@ -293,6 +298,7 @@ namespace Artemis.Core { Delta += delta; Position += delta; + IsOverridden = false; if (stickToMainSegment && Position >= MainSegmentStartPosition) { @@ -371,6 +377,8 @@ namespace Artemis.Core { Delta += position - Position; Position = position; + IsOverridden = true; + if (stickToMainSegment && Position >= MainSegmentStartPosition) Position = MainSegmentStartPosition + TimeSpan.FromMilliseconds(Position.TotalMilliseconds % MainSegmentLength.TotalMilliseconds); diff --git a/src/Artemis.Core/Plugins/Plugin.cs b/src/Artemis.Core/Plugins/Plugin.cs index d3ba8b262..5abb34c91 100644 --- a/src/Artemis.Core/Plugins/Plugin.cs +++ b/src/Artemis.Core/Plugins/Plugin.cs @@ -43,7 +43,7 @@ namespace Artemis.Core /// The action to call every time the interval has passed. The delta time parameter represents the /// time passed since the last update in seconds /// - /// The resulting plugin update registration + /// The resulting plugin update registration which can be used to stop the update public PluginUpdateRegistration AddTimedUpdate(TimeSpan interval, Action action) { if (action == null) diff --git a/src/Artemis.UI.Shared/DataModelVisualization/Input/DataModelStaticView.xaml b/src/Artemis.UI.Shared/DataModelVisualization/Input/DataModelStaticView.xaml index 3caf803cf..5b4b60bfb 100644 --- a/src/Artemis.UI.Shared/DataModelVisualization/Input/DataModelStaticView.xaml +++ b/src/Artemis.UI.Shared/DataModelVisualization/Input/DataModelStaticView.xaml @@ -16,12 +16,21 @@ + - - + - - + diff --git a/src/Artemis.UI/Screens/ProfileEditor/Conditions/DataModelConditionGroupViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/Conditions/DataModelConditionGroupViewModel.cs index 69f9726fe..0af34024f 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Conditions/DataModelConditionGroupViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/Conditions/DataModelConditionGroupViewModel.cs @@ -131,7 +131,6 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions // Remove VMs of effects no longer applied on the layer Items.RemoveRange(Items.Where(c => !DataModelConditionGroup.Children.Contains(c.Model)).ToList()); - List viewModels = new List(); foreach (DataModelConditionPart childModel in Model.Children) { if (Items.Any(c => c.Model == childModel)) @@ -140,32 +139,28 @@ namespace Artemis.UI.Screens.ProfileEditor.Conditions switch (childModel) { case DataModelConditionGroup dataModelConditionGroup: - viewModels.Add(_dataModelConditionsVmFactory.DataModelConditionGroupViewModel(dataModelConditionGroup, GroupType)); + Items.Add(_dataModelConditionsVmFactory.DataModelConditionGroupViewModel(dataModelConditionGroup, GroupType)); break; case DataModelConditionList dataModelConditionList: - viewModels.Add(_dataModelConditionsVmFactory.DataModelConditionListViewModel(dataModelConditionList)); + Items.Add(_dataModelConditionsVmFactory.DataModelConditionListViewModel(dataModelConditionList)); break; case DataModelConditionEvent dataModelConditionEvent: - viewModels.Add(_dataModelConditionsVmFactory.DataModelConditionEventViewModel(dataModelConditionEvent)); + Items.Add(_dataModelConditionsVmFactory.DataModelConditionEventViewModel(dataModelConditionEvent)); break; case DataModelConditionGeneralPredicate dataModelConditionGeneralPredicate: - viewModels.Add(_dataModelConditionsVmFactory.DataModelConditionGeneralPredicateViewModel(dataModelConditionGeneralPredicate)); + Items.Add(_dataModelConditionsVmFactory.DataModelConditionGeneralPredicateViewModel(dataModelConditionGeneralPredicate)); break; case DataModelConditionListPredicate dataModelConditionListPredicate: - viewModels.Add(_dataModelConditionsVmFactory.DataModelConditionListPredicateViewModel(dataModelConditionListPredicate)); + Items.Add(_dataModelConditionsVmFactory.DataModelConditionListPredicateViewModel(dataModelConditionListPredicate)); break; case DataModelConditionEventPredicate dataModelConditionEventPredicate: - viewModels.Add(_dataModelConditionsVmFactory.DataModelConditionEventPredicateViewModel(dataModelConditionEventPredicate)); + Items.Add(_dataModelConditionsVmFactory.DataModelConditionEventPredicateViewModel(dataModelConditionEventPredicate)); break; } } - if (viewModels.Any()) - Items.AddRange(viewModels); - // Ensure the items are in the same order as on the model ((BindableCollection) Items).Sort(i => Model.Children.IndexOf(i.Model)); - foreach (DataModelConditionViewModel childViewModel in Items) childViewModel.Update(); diff --git a/src/Artemis.UI/Screens/ProfileEditor/Conditions/DataModelConditionListView.xaml b/src/Artemis.UI/Screens/ProfileEditor/Conditions/DataModelConditionListView.xaml index 667a15b2f..f19dd3a0c 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Conditions/DataModelConditionListView.xaml +++ b/src/Artemis.UI/Screens/ProfileEditor/Conditions/DataModelConditionListView.xaml @@ -16,7 +16,7 @@ - + diff --git a/src/Artemis.UI/Screens/ProfileEditor/Conditions/Predicate/DataModelConditionEventPredicateView.xaml b/src/Artemis.UI/Screens/ProfileEditor/Conditions/Predicate/DataModelConditionEventPredicateView.xaml index 4527676f7..3fb1a1bd9 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Conditions/Predicate/DataModelConditionEventPredicateView.xaml +++ b/src/Artemis.UI/Screens/ProfileEditor/Conditions/Predicate/DataModelConditionEventPredicateView.xaml @@ -21,7 +21,7 @@ - + diff --git a/src/Artemis.UI/Screens/ProfileEditor/Conditions/Predicate/DataModelConditionGeneralPredicateView.xaml b/src/Artemis.UI/Screens/ProfileEditor/Conditions/Predicate/DataModelConditionGeneralPredicateView.xaml index 931d22b7b..dfcac88d1 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Conditions/Predicate/DataModelConditionGeneralPredicateView.xaml +++ b/src/Artemis.UI/Screens/ProfileEditor/Conditions/Predicate/DataModelConditionGeneralPredicateView.xaml @@ -21,7 +21,7 @@ - + diff --git a/src/Artemis.UI/Screens/ProfileEditor/Conditions/Predicate/DataModelConditionListPredicateView.xaml b/src/Artemis.UI/Screens/ProfileEditor/Conditions/Predicate/DataModelConditionListPredicateView.xaml index bbdb58f92..b22c824d3 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/Conditions/Predicate/DataModelConditionListPredicateView.xaml +++ b/src/Artemis.UI/Screens/ProfileEditor/Conditions/Predicate/DataModelConditionListPredicateView.xaml @@ -21,7 +21,7 @@ - + diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/ConditionalDataBindingModeView.xaml b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/ConditionalDataBindingModeView.xaml index f28be532a..bed240696 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/ConditionalDataBindingModeView.xaml +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/ConditionalDataBindingModeView.xaml @@ -5,18 +5,13 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:s="https://github.com/canton7/Stylet" - xmlns:dd="urn:gong-wpf-dragdrop" xmlns:Converters="clr-namespace:Artemis.UI.Converters" - xmlns:utilities="clr-namespace:Artemis.UI.Utilities" + xmlns:dd="urn:gong-wpf-dragdrop" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"> - - - - @@ -27,43 +22,16 @@ : Screen, IDataBindingModeViewModel + public class ConditionalDataBindingModeViewModel : Conductor>.Collection.AllActive, IDataBindingModeViewModel { private readonly IDataBindingsVmFactory _dataBindingsVmFactory; private readonly IProfileEditorService _profileEditorService; @@ -24,18 +24,83 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings.Conditio _dataBindingsVmFactory = dataBindingsVmFactory; ConditionalDataBinding = conditionalDataBinding; - ConditionViewModels = new BindableCollection>(); - - Initialize(); } public ConditionalDataBinding ConditionalDataBinding { get; } - public BindableCollection> ConditionViewModels { get; } + + public void AddCondition() + { + DataBindingCondition condition = ConditionalDataBinding.AddCondition(); + + // Find the VM of the new condition + DataBindingConditionViewModel viewModel = Items.First(c => c.DataBindingCondition == condition); + viewModel.ActiveItem.AddCondition(); + + _profileEditorService.UpdateSelectedProfileElement(); + } + + protected override void OnInitialActivate() + { + base.OnInitialActivate(); + Initialize(); + } + + private void UpdateItems() + { + _updating = true; + + // Remove old VMs + List> toRemove = Items.Where(c => !ConditionalDataBinding.Conditions.Contains(c.DataBindingCondition)).ToList(); + foreach (DataBindingConditionViewModel dataBindingConditionViewModel in toRemove) + { + Items.Remove(dataBindingConditionViewModel); + dataBindingConditionViewModel.Dispose(); + } + + // Add missing VMs + foreach (DataBindingCondition condition in ConditionalDataBinding.Conditions) + if (Items.All(c => c.DataBindingCondition != condition)) + Items.Add(_dataBindingsVmFactory.DataBindingConditionViewModel(condition)); + + // Fix order + ((BindableCollection>) Items).Sort(c => c.DataBindingCondition.Order); + + _updating = false; + } + + private void Initialize() + { + ConditionalDataBinding.ConditionsUpdated += ConditionalDataBindingOnConditionsUpdated; + Items.CollectionChanged += ItemsOnCollectionChanged; + UpdateItems(); + } + + private void ItemsOnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) + { + if (_updating || e.Action != NotifyCollectionChangedAction.Add) + return; + + for (int index = 0; index < Items.Count; index++) + { + DataBindingConditionViewModel conditionViewModel = Items[index]; + conditionViewModel.DataBindingCondition.Order = index + 1; + } + + ConditionalDataBinding.ApplyOrder(); + + _profileEditorService.UpdateSelectedProfileElement(); + } + + private void ConditionalDataBindingOnConditionsUpdated(object sender, EventArgs e) + { + UpdateItems(); + } + public bool SupportsTestValue => false; public void Update() { - UpdateConditionViewModels(); + UpdateItems(); } public object GetTestValue() @@ -49,64 +114,11 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings.Conditio { ConditionalDataBinding.ConditionsUpdated -= ConditionalDataBindingOnConditionsUpdated; - foreach (DataBindingConditionViewModel conditionViewModel in ConditionViewModels) + foreach (DataBindingConditionViewModel conditionViewModel in Items) conditionViewModel.Dispose(); - ConditionViewModels.Clear(); + Items.Clear(); } #endregion - - private void UpdateConditionViewModels() - { - _updating = true; - - // Remove old VMs - List> toRemove = ConditionViewModels.Where(c => !ConditionalDataBinding.Conditions.Contains(c.DataBindingCondition)).ToList(); - foreach (DataBindingConditionViewModel dataBindingConditionViewModel in toRemove) - { - ConditionViewModels.Remove(dataBindingConditionViewModel); - dataBindingConditionViewModel.Dispose(); - } - - // Add missing VMs - foreach (DataBindingCondition condition in ConditionalDataBinding.Conditions) - { - if (ConditionViewModels.All(c => c.DataBindingCondition != condition)) - ConditionViewModels.Add(_dataBindingsVmFactory.DataBindingConditionViewModel(condition)); - } - - // Fix order - ConditionViewModels.Sort(c => c.DataBindingCondition.Order); - - _updating = false; - } - - private void Initialize() - { - ConditionalDataBinding.ConditionsUpdated += ConditionalDataBindingOnConditionsUpdated; - ConditionViewModels.CollectionChanged += ConditionViewModelsOnCollectionChanged; - UpdateConditionViewModels(); - } - - private void ConditionViewModelsOnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) - { - if (_updating || e.Action != NotifyCollectionChangedAction.Add) - return; - - for (int index = 0; index < ConditionViewModels.Count; index++) - { - DataBindingConditionViewModel conditionViewModel = ConditionViewModels[index]; - conditionViewModel.DataBindingCondition.Order = index + 1; - } - - ConditionalDataBinding.ApplyOrder(); - - _profileEditorService.UpdateSelectedProfileElement(); - } - - private void ConditionalDataBindingOnConditionsUpdated(object sender, EventArgs e) - { - UpdateConditionViewModels(); - } } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/DataBindingConditionView.xaml b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/DataBindingConditionView.xaml index 4b068ef90..f3e1833c6 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/DataBindingConditionView.xaml +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/DataBindingConditionView.xaml @@ -18,7 +18,7 @@ IsTabStop="False" /> : Conductor, IDisposable { private readonly IProfileEditorService _profileEditorService; + private readonly IDataModelConditionsVmFactory _dataModelConditionsVmFactory; + private readonly IDataModelUIService _dataModelUIService; public DataBindingConditionViewModel(DataBindingCondition dataBindingCondition, IProfileEditorService profileEditorService, @@ -20,22 +22,28 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings.Conditio IDataModelUIService dataModelUIService) { _profileEditorService = profileEditorService; + _dataModelConditionsVmFactory = dataModelConditionsVmFactory; + _dataModelUIService = dataModelUIService; DataBindingCondition = dataBindingCondition; - - ActiveItem = dataModelConditionsVmFactory.DataModelConditionGroupViewModel(DataBindingCondition.Condition, ConditionGroupType.General); - ActiveItem.IsRootGroup = true; - ActiveItem.Update(); - ActiveItem.Updated += ActiveItemOnUpdated; - - ValueViewModel = dataModelUIService.GetStaticInputViewModel(typeof(TProperty), null); - ValueViewModel.ValueUpdated += ValueViewModelOnValueUpdated; - ValueViewModel.Value = DataBindingCondition.Value; } public DataBindingCondition DataBindingCondition { get; } public DataModelStaticViewModel ValueViewModel { get; set; } + protected override void OnInitialActivate() + { + base.OnInitialActivate(); + ActiveItem = _dataModelConditionsVmFactory.DataModelConditionGroupViewModel(DataBindingCondition.Condition, ConditionGroupType.General); + ActiveItem.IsRootGroup = true; + ActiveItem.Update(); + ActiveItem.Updated += ActiveItemOnUpdated; + + ValueViewModel = _dataModelUIService.GetStaticInputViewModel(typeof(TProperty), null); + ValueViewModel.ValueUpdated += ValueViewModelOnValueUpdated; + ValueViewModel.Value = DataBindingCondition.Value; + } + public void Dispose() { ValueViewModel.Dispose(); diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingViewModel.cs index 9c7d0a4cd..95d873b28 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingViewModel.cs @@ -44,7 +44,11 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings EasingViewModels = new BindableCollection(); TestInputValue = dataModelUIService.GetDataModelDisplayViewModel(typeof(TProperty), null, true); TestResultValue = dataModelUIService.GetDataModelDisplayViewModel(typeof(TProperty), null, true); + } + protected override void OnInitialActivate() + { + base.OnInitialActivate(); Initialize(); } @@ -237,7 +241,7 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings } // While playing in preview data bindings aren't updated - Registration.DataBinding.Update(Registration.LayerProperty.ProfileElement.Timeline); + Registration.DataBinding.UpdateWithDelta(TimeSpan.FromMilliseconds(40)); if (ActiveItem.SupportsTestValue) { diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsViewModel.cs index 81e4c9e12..bfe1f5a54 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsViewModel.cs @@ -48,7 +48,7 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings // and creating the actual data bindings foreach (IDataBindingRegistration registration in registrations) Items.Add(_dataBindingsVmFactory.DataBindingViewModel(registration)); - + SelectedItemIndex = 0; } diff --git a/src/Artemis.UI/Screens/RootView.xaml b/src/Artemis.UI/Screens/RootView.xaml index 7cd6ac604..c4d5e45bb 100644 --- a/src/Artemis.UI/Screens/RootView.xaml +++ b/src/Artemis.UI/Screens/RootView.xaml @@ -55,9 +55,9 @@ DialogTheme="Inherit" SnackbarMessageQueue="{Binding MainMessageQueue}"> - + - +