mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-18 17:10:05 +02:00
Clearer code for TimeTrack ruler
(Thanks to pi1024e)
This commit is contained in:
parent
91bf05d18c
commit
efc8f216b1
@ -99,12 +99,8 @@ void DrawHorzRulerAndCurve
|
||||
// Draw the Ruler
|
||||
ruler.SetBounds(r.x, r.y, r.x + r.width - 1, r.y + r.height - 1);
|
||||
ruler.SetRange(min, max);
|
||||
ruler.SetFlip(false); // If we don't do this, the Ruler doesn't redraw itself when the envelope is modified.
|
||||
// I have no idea why!
|
||||
//
|
||||
// LL: It's because the ruler only Invalidate()s when the NEW value is different
|
||||
// than the current value.
|
||||
ruler.SetFlip(TrackView::Get( track ).GetHeight() > 75 ? true : true); // MB: so why don't we just call Invalidate()? :)
|
||||
ruler.SetFlip(true); // tick marks at top of track.
|
||||
ruler.Invalidate(); // otherwise does not redraw.
|
||||
ruler.SetTickColour( theTheme.Colour( clrTrackPanelText ));
|
||||
ruler.Draw(dc, track.GetEnvelope());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user