mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 17:30:17 +01:00
Do without some friend declarations in LabelTrack...
... and leave "updated" alone, it's only for use in interactive dragging
This commit is contained in:
@@ -148,6 +148,15 @@ LabelTrack::LabelTrack(const LabelTrack &orig) :
|
||||
ResetFlags();
|
||||
}
|
||||
|
||||
void LabelTrack::SetLabel( size_t iLabel, const LabelStruct &newLabel )
|
||||
{
|
||||
if( iLabel >= mLabels.size() ) {
|
||||
wxASSERT( false );
|
||||
mLabels.resize( iLabel + 1 );
|
||||
}
|
||||
mLabels[ iLabel ] = newLabel;
|
||||
}
|
||||
|
||||
LabelTrack::~LabelTrack()
|
||||
{
|
||||
}
|
||||
@@ -937,6 +946,14 @@ void LabelTrack::Draw
|
||||
}
|
||||
}
|
||||
|
||||
void LabelTrack::SetSelectedIndex( int index )
|
||||
{
|
||||
if ( index >= 0 && index < mLabels.size() )
|
||||
mSelIndex = index;
|
||||
else
|
||||
mSelIndex = -1;
|
||||
}
|
||||
|
||||
/// uses GetTextExtent to find the character position
|
||||
/// corresponding to the x pixel position.
|
||||
int LabelTrack::FindCurrentCursorPosition(int xPos)
|
||||
|
||||
Reference in New Issue
Block a user