1
0
mirror of https://github.com/Artemis-RGB/Artemis synced 2025-12-13 05:48:35 +00:00

Profile editor - Fixed error when editing layers with a zero length main timeline

This commit is contained in:
SpoinkyNL 2020-11-23 21:31:35 +01:00
parent 29ee64e7a8
commit 0c7583d3e4

View File

@ -387,7 +387,12 @@ namespace Artemis.Core
IsOverridden = true;
if (stickToMainSegment && Position >= MainSegmentStartPosition)
Position = MainSegmentStartPosition + TimeSpan.FromMilliseconds(Position.TotalMilliseconds % MainSegmentLength.TotalMilliseconds);
{
if (MainSegmentLength > TimeSpan.Zero)
Position = MainSegmentStartPosition + TimeSpan.FromMilliseconds(Position.TotalMilliseconds % MainSegmentLength.TotalMilliseconds);
else
Position = MainSegmentStartPosition;
}
_extraTimelines.Clear();
}