1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-29 23:19:28 +02:00

width becomes fTimeSpan (in response to an ANSWER-ME). Avoids confusion with 'width' in the label, which is a pixel width of the label's text.

This commit is contained in:
james.k.crook@gmail.com 2012-02-09 13:10:36 +00:00
parent 51bd1c2a4d
commit 6817143d2b

View File

@ -1220,18 +1220,16 @@ void LabelStruct::AdjustEdge( int iEdge, double fNewTime)
// We're moving the label. Adjust both left and right edge. // We're moving the label. Adjust both left and right edge.
void LabelStruct::MoveLabel( int iEdge, double fNewTime) void LabelStruct::MoveLabel( int iEdge, double fNewTime)
{ {
// ANSWER-ME: Vigilant Sentry notes this "width" shadows the member var of same name. double fTimeSpan = getDuration();
// Is that what we actually want?
double width = getDuration();
if( iEdge < 0 ) if( iEdge < 0 )
{ {
t = fNewTime; t = fNewTime;
t1 = fNewTime+width; t1 = fNewTime+fTimeSpan;
} }
else else
{ {
t = fNewTime-width; t = fNewTime-fTimeSpan;
t1 = fNewTime; t1 = fNewTime;
} }
updated = true; updated = true;