Fixed length of imported events
This commit is contained in:
parent
4ac159dc4c
commit
933f324943
|
@ -49,13 +49,13 @@ public class EntryPoint {
|
||||||
List<TimedEvent> filteredEvents = FilterEvents(timedEvents[eventType], visualization.Regex);
|
List<TimedEvent> filteredEvents = FilterEvents(timedEvents[eventType], visualization.Regex);
|
||||||
foreach (TimedEvent timedEvent in filteredEvents) {
|
foreach (TimedEvent timedEvent in filteredEvents) {
|
||||||
Timecode start = Timecode.FromSeconds(timedEvent.Start);
|
Timecode start = Timecode.FromSeconds(timedEvent.Start);
|
||||||
Timecode end = Timecode.FromSeconds(timedEvent.End);
|
Timecode length = Timecode.FromSeconds(timedEvent.End) - start;
|
||||||
switch (visualization.VisualizationType) {
|
switch (visualization.VisualizationType) {
|
||||||
case VisualizationType.Marker:
|
case VisualizationType.Marker:
|
||||||
project.Markers.Add(new Marker(start, timedEvent.Value));
|
project.Markers.Add(new Marker(start, timedEvent.Value));
|
||||||
break;
|
break;
|
||||||
case VisualizationType.Region:
|
case VisualizationType.Region:
|
||||||
project.Regions.Add(new Region(start, end, timedEvent.Value));
|
project.Regions.Add(new Region(start, length, timedEvent.Value));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue