1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-10 00:51:13 +02:00

Cursor line in the ruler should always follow that in TrackPanel, as after "j"

This commit is contained in:
Paul Licameli 2016-04-27 17:48:55 -04:00
parent 5086260a60
commit 68eda0f802
3 changed files with 2 additions and 13 deletions

View File

@ -111,7 +111,7 @@ void EditCursorOverlay::Draw
}
// AS: Ah, no, this is where we draw the blinky thing in the ruler.
mProject->GetRulerPanel()->DrawCursor(mCursorTime);
mProject->GetRulerPanel()->Refresh();
// This updates related displays such as numbers on the status bar
mProject->TP_DisplaySelection();

View File

@ -1793,7 +1793,6 @@ AdornedRulerPanel::AdornedRulerPanel(AudacityProject* parent,
mCursorSizeWE = wxCursor(wxCURSOR_SIZEWE);
mLeftOffset = 0;
mCurTime = -1;
mIndTime = -1;
mIndType = -1;
mQuickPlayInd = false;
@ -2723,16 +2722,9 @@ void AdornedRulerPanel::SetLeftOffset(int offset)
mRuler.SetUseZoomInfo(offset, mViewInfo);
}
void AdornedRulerPanel::DrawCursor(double time)
{
mCurTime = time;
Refresh();
}
void AdornedRulerPanel::DoDrawCursor(wxDC * dc)
{
const int x = Time2Pos(mCurTime);
const int x = Time2Pos(mViewInfo->selectedRegion.t0());
// Draw cursor in ruler
dc->DrawLine( x, 1, x, mInner.height );

View File

@ -294,7 +294,6 @@ public:
static int GetRulerHeight() { return 28; }
void SetLeftOffset(int offset);
void DrawCursor(double time);
void DrawIndicator(double time, bool rec);
void DrawSelection();
void ClearIndicator();
@ -368,8 +367,6 @@ private:
int mLeftOffset; // Number of pixels before we hit the 'zero position'.
double mCurTime;
int mIndType; // -1 = No indicator, 0 = Record, 1 = Play
double mIndTime;