From e8f5e3e084ec5a52c79da5d720abd04d6a654bb8 Mon Sep 17 00:00:00 2001 From: James Crook Date: Mon, 19 Sep 2016 19:41:49 +0100 Subject: [PATCH] Revert "Avoid wasteful Refresh() in stereo track spectrogram view. Was believed to cause other problems, namely with ruler not lining up with selection. --- src/TrackPanel.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index 5e10300bd..49217d1e8 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -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); }