mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Profile - Tweak initial load timeline behaviour
This commit is contained in:
parent
887154d738
commit
730207ccd0
@ -99,11 +99,12 @@ namespace Artemis.Core
|
||||
/// <inheritdoc />
|
||||
public override void Reset()
|
||||
{
|
||||
DisplayConditionMet = false;
|
||||
Timeline.JumpToEnd();
|
||||
UpdateDisplayCondition();
|
||||
|
||||
foreach (ProfileElement child in Children)
|
||||
child.Reset();
|
||||
if (DisplayConditionMet)
|
||||
Timeline.JumpToStart();
|
||||
else
|
||||
Timeline.JumpToEnd();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@ -243,6 +244,7 @@ namespace Artemis.Core
|
||||
internal override void Load()
|
||||
{
|
||||
ExpandedPropertyGroups.AddRange(FolderEntity.ExpandedPropertyGroups);
|
||||
Reset();
|
||||
|
||||
// Load child folders
|
||||
foreach (FolderEntity childFolder in Profile.ProfileEntity.Folders.Where(f => f.ParentId == EntityId))
|
||||
|
||||
@ -329,8 +329,12 @@ namespace Artemis.Core
|
||||
/// <inheritdoc />
|
||||
public override void Reset()
|
||||
{
|
||||
DisplayConditionMet = false;
|
||||
Timeline.JumpToEnd();
|
||||
UpdateDisplayCondition();
|
||||
|
||||
if (DisplayConditionMet)
|
||||
Timeline.JumpToStart();
|
||||
else
|
||||
Timeline.JumpToEnd();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
|
||||
@ -125,6 +125,7 @@ namespace Artemis.Core
|
||||
bool stickToMainSegment = Timeline.PlayMode == TimelinePlayMode.Repeat && DisplayConditionMet;
|
||||
if (DisplayCondition != null && DisplayCondition.ContainsEvents)
|
||||
stickToMainSegment = false;
|
||||
|
||||
Timeline.Update(TimeSpan.FromSeconds(deltaTime), stickToMainSegment);
|
||||
}
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using Artemis.Storage.Entities.Profile;
|
||||
|
||||
namespace Artemis.Core
|
||||
@ -322,7 +323,7 @@ namespace Artemis.Core
|
||||
|
||||
IsOverridden = false;
|
||||
_lastOverridePosition = Position;
|
||||
|
||||
|
||||
if (stickToMainSegment && Position > MainSegmentEndPosition)
|
||||
{
|
||||
// If the main segment has no length, simply stick to the start of the segment
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user