mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-01 16:19:43 +02:00
Revert "Fix ghost image on track panel"
This reverts commit b19ed258e963c9342f0a573a3f054d9a8336f7fa.
This commit is contained in:
parent
b19ed258e9
commit
a80c20c9b2
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user