1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-27 17:48:38 +02:00

Revert "Avoid wasteful Refresh() in stereo track spectrogram view.

Was believed to cause other problems, namely with ruler not lining up with selection.
This commit is contained in:
James Crook 2016-09-19 19:41:49 +01:00
parent d63ffa123e
commit e8f5e3e084

View File

@ -7321,20 +7321,16 @@ void TrackPanel::UpdateVRulerSize()
TrackListIterator iter(GetTracks());
Track *t = iter.First();
if (t) {
// Find the maximum of the VRuler sizes.
// We are only interested in width in fact.
wxSize s = t->vrulerSize;
while (t) {
s.IncTo(t->vrulerSize);
t = iter.Next();
}
// If the width of the VRuler has changed, we need to
// shift the HRuler
if (vrulerSize.GetWidth() != s.GetWidth()) {
if (vrulerSize != s) {
vrulerSize = s;
mRuler->SetLeftOffset(GetLeftOffset()); // bevel on AdornedRuler
mRuler->Refresh();
}
vrulerSize = s;
}
Refresh(false);
}