diff --git a/src/Artemis.Core/Plugins/Modules/ProfileModule.cs b/src/Artemis.Core/Plugins/Modules/ProfileModule.cs index cfbdc89e0..081959517 100644 --- a/src/Artemis.Core/Plugins/Modules/ProfileModule.cs +++ b/src/Artemis.Core/Plugins/Modules/ProfileModule.cs @@ -205,6 +205,7 @@ namespace Artemis.Core.Modules throw new ArtemisPluginFeatureException(this, $"Cannot add default profile from {file}, profile ID {profileEntity.Id} already in use."); profileEntity.IsFreshImport = true; + profileEntity.IsActive = false; _defaultProfiles.Add(profileEntity); return true; diff --git a/src/Artemis.Core/Services/Storage/ProfileService.cs b/src/Artemis.Core/Services/Storage/ProfileService.cs index 61c5f147a..e405cdfed 100644 --- a/src/Artemis.Core/Services/Storage/ProfileService.cs +++ b/src/Artemis.Core/Services/Storage/ProfileService.cs @@ -311,8 +311,9 @@ namespace Artemis.Core.Services // Assign a new GUID to make sure it is unique in case of a previous import of the same content profileEntity.UpdateGuid(Guid.NewGuid()); profileEntity.Name = $"{profileEntity.Name} - {nameAffix}"; - profileEntity.IsFreshImport = true; + profileEntity.IsActive = false; + _profileRepository.Add(profileEntity); return new ProfileDescriptor(profileModule, profileEntity); } diff --git a/src/Artemis.UI/Screens/ProfileEditor/DisplayConditions/DisplayConditionsViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/DisplayConditions/DisplayConditionsViewModel.cs index 59856ce6f..b203639b2 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/DisplayConditions/DisplayConditionsViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/DisplayConditions/DisplayConditionsViewModel.cs @@ -1,4 +1,5 @@ using System; +using System.ComponentModel; using System.Linq; using Artemis.Core; using Artemis.Core.Services; @@ -107,6 +108,7 @@ namespace Artemis.UI.Screens.ProfileEditor.DisplayConditions { RenderProfileElement.DisplayCondition.ChildAdded -= DisplayConditionOnChildrenModified; RenderProfileElement.DisplayCondition.ChildRemoved -= DisplayConditionOnChildrenModified; + RenderProfileElement.Timeline.PropertyChanged -= TimelineOnPropertyChanged; } RenderProfileElement = e.RenderProfileElement; @@ -134,6 +136,14 @@ namespace Artemis.UI.Screens.ProfileEditor.DisplayConditions RenderProfileElement.DisplayCondition.ChildAdded += DisplayConditionOnChildrenModified; RenderProfileElement.DisplayCondition.ChildRemoved += DisplayConditionOnChildrenModified; + RenderProfileElement.Timeline.PropertyChanged += TimelineOnPropertyChanged; + } + + private void TimelineOnPropertyChanged(object? sender, PropertyChangedEventArgs e) + { + NotifyOfPropertyChange(nameof(DisplayContinuously)); + NotifyOfPropertyChange(nameof(AlwaysFinishTimeline)); + NotifyOfPropertyChange(nameof(EventOverlapMode)); } private void CoreServiceOnFrameRendered(object sender, FrameRenderedEventArgs e) diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/Timeline/TimelineSegmentViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/Timeline/TimelineSegmentViewModel.cs index 09be9d296..8d8c52ee9 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/Timeline/TimelineSegmentViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/Timeline/TimelineSegmentViewModel.cs @@ -190,6 +190,8 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.Timeline ShowRepeatButton = SegmentWidth > 45 && IsMainSegment; ShowDisableButton = SegmentWidth > 25; + if (Segment == SegmentViewModelType.Main) + NotifyOfPropertyChange(nameof(RepeatSegment)); } private void Update()