From a80c20c9b2935a68e36878072aa7daadd2d09d30 Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Wed, 19 Aug 2015 15:37:27 -0500 Subject: [PATCH] Revert "Fix ghost image on track panel" This reverts commit b19ed258e963c9342f0a573a3f054d9a8336f7fa. --- src/TrackPanel.cpp | 12 +++++++----- src/widgets/Ruler.cpp | 7 +++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index 80dc9aaa8..9ff92f444 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -8426,21 +8426,23 @@ void TrackPanel::SeekLeftOrRight // negative to move backward. double TrackPanel::GridMove(double t, int minPix) { - NumericConverter nc(NumericConverter::TIME, GetProject()->GetSelectionFormat(), t, GetProject()->GetRate()); + NumericTextCtrl ttc(NumericConverter::TIME, this, wxID_ANY, wxT(""), 0.0, GetProject()->GetRate()); + ttc.SetFormatName(GetProject()->GetSelectionFormat()); + ttc.SetValue(t); // Try incrementing/decrementing the value; if we've moved far enough we're // done double result; - minPix >= 0 ? nc.Increment() : nc.Decrement(); - result = nc.GetValue(); + minPix >= 0 ? ttc.Increment() : ttc.Decrement(); + result = ttc.GetValue(); if (std::abs(mViewInfo->TimeToPosition(result) - mViewInfo->TimeToPosition(t)) >= abs(minPix)) return result; // Otherwise, move minPix pixels, then snap to the time. result = mViewInfo->OffsetTimeByPixels(t, minPix); - nc.SetValue(result); - result = nc.GetValue(); + ttc.SetValue(result); + result = ttc.GetValue(); return result; } diff --git a/src/widgets/Ruler.cpp b/src/widgets/Ruler.cpp index 2dd8be065..9e19fd1b2 100644 --- a/src/widgets/Ruler.cpp +++ b/src/widgets/Ruler.cpp @@ -1836,8 +1836,7 @@ void AdornedRulerPanel::OnErase(wxEraseEvent & WXUNUSED(evt)) void AdornedRulerPanel::OnPaint(wxPaintEvent & WXUNUSED(evt)) { -// wxBufferedPaintDC dc(this); - wxPaintDC dc(this); + wxBufferedPaintDC dc(this); DoDrawBorder(&dc); @@ -1846,8 +1845,6 @@ void AdornedRulerPanel::OnPaint(wxPaintEvent & WXUNUSED(evt)) DoDrawSelection(&dc); } - DoDrawMarks(&dc, true); - if (mIndType >= 0) { DoDrawIndicator(&dc); @@ -1858,6 +1855,8 @@ void AdornedRulerPanel::OnPaint(wxPaintEvent & WXUNUSED(evt)) DrawQuickPlayIndicator(&dc, false); } + DoDrawMarks(&dc, true); + if (mViewInfo->selectedRegion.isPoint()) { DoDrawCursor(&dc);