mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-08 04:32:00 +01:00
Rename LabelTrack::IsSelected so it doesn't shadow Track::IsSelected
This commit is contained in:
@@ -2274,7 +2274,7 @@ void LabelTrack::Unselect()
|
||||
mSelIndex = -1;
|
||||
}
|
||||
|
||||
bool LabelTrack::IsSelected() const
|
||||
bool LabelTrack::HasSelection() const
|
||||
{
|
||||
return (mSelIndex >= 0 && mSelIndex < (int)mLabels.size());
|
||||
}
|
||||
|
||||
@@ -229,7 +229,8 @@ class AUDACITY_DLL_API LabelTrack final : public Track
|
||||
|
||||
void Unselect();
|
||||
|
||||
bool IsSelected() const;
|
||||
// Whether any label box is selected -- not, whether the track is selected.
|
||||
bool HasSelection() const;
|
||||
|
||||
int GetNumLabels() const;
|
||||
const LabelStruct *GetLabel(int index) const;
|
||||
|
||||
@@ -38,7 +38,7 @@ bool DoPasteText(AudacityProject &project)
|
||||
for (auto pLabelTrack : tracks->Any<LabelTrack>())
|
||||
{
|
||||
// Does this track have an active label?
|
||||
if (pLabelTrack->IsSelected()) {
|
||||
if (pLabelTrack->HasSelection()) {
|
||||
|
||||
// Yes, so try pasting into it
|
||||
if (pLabelTrack->PasteSelectedText(selectedRegion.t0(),
|
||||
|
||||
@@ -82,7 +82,7 @@ UIHandle::Result LabelTextHandle::Click
|
||||
|
||||
mSelectedRegion = viewInfo.selectedRegion;
|
||||
pLT->HandleTextClick( event, evt.rect, viewInfo, &viewInfo.selectedRegion );
|
||||
wxASSERT(pLT->IsSelected());
|
||||
wxASSERT(pLT->HasSelection());
|
||||
|
||||
{
|
||||
// IF the user clicked a label, THEN select all other tracks by Label
|
||||
|
||||
Reference in New Issue
Block a user