Fix measure ticks drawing beyond the end of the song.

This commit is contained in:
EliteMasterEric
2025-12-22 20:59:44 -05:00
committed by Hundrec
parent 2177534a5b
commit da40dfb824
@@ -179,9 +179,11 @@ class ChartEditorMeasureTicks extends FlxTypedSpriteGroup<FlxSprite>
var targetMeasure:Int = currentMeasure + i - 1;
if (targetMeasure < 0) continue;
// TODO: This math is kinda awkward but DOES account for time signatures,
// might want some cleanup though? Maybe add a `getMeasureTimeInSteps` method?
var measureTimeInMs:Float = Conductor.instance.getMeasureTimeInMs(targetMeasure);
// If we've gone past the end of the song, we're done.
if (measureTimeInMs > chartEditorState.songLengthInMs) break;
var measureTimeInSteps:Float = Conductor.instance.getTimeInSteps(measureTimeInMs);
var measureTimeInPixels:Float = measureTimeInSteps * ChartEditorState.GRID_SIZE;