1
0
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:
Paul Licameli
2018-11-08 11:07:42 -05:00
parent 03b0d3f89a
commit 2d650fa0e8
4 changed files with 5 additions and 4 deletions

View File

@@ -2274,7 +2274,7 @@ void LabelTrack::Unselect()
mSelIndex = -1;
}
bool LabelTrack::IsSelected() const
bool LabelTrack::HasSelection() const
{
return (mSelIndex >= 0 && mSelIndex < (int)mLabels.size());
}

View File

@@ -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;

View File

@@ -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(),

View File

@@ -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