Skip to content

Commit 096583b

Browse files
committed
Add alternate timescale units for seconds and millis
1 parent 7aa3556 commit 096583b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Source/Plugins/LfpDisplayNodeAlpha/LfpDisplayCanvas.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,7 +1856,8 @@ void LfpTimescale::paint(Graphics& g)
18561856

18571857
g.setColour(Colour(100,100,100));
18581858

1859-
g.drawText("ms:",5,0,100,getHeight(),Justification::left, false);
1859+
const String timeScaleUnitLabel = (timebase >= 2)?("s:"):("ms:");
1860+
g.drawText(timeScaleUnitLabel,5,0,100,getHeight(),Justification::left, false);
18601861

18611862
const int steps = labels.size() + 1;
18621863
for (int i = 1; i < steps; i++)
@@ -1961,7 +1962,7 @@ void LfpTimescale::setTimebase(float t)
19611962

19621963
for (float i = labelIncrement; i < timebase; i += labelIncrement)
19631964
{
1964-
String labelString = String(i * 1000.0f);
1965+
String labelString = String(i * ((timebase >= 2)?(1):(1000.0f)));
19651966
labels.add(labelString.substring(0,6));
19661967
}
19671968

0 commit comments

Comments
 (0)