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

Bug1437: Label Edit wont delete other labels, duplicate other tracks

This refers to the new Edit... command in the popup menu for individual labels.

The label editor can also be reached from toolbar menus, which shows data
for all labels.
This commit is contained in:
Paul Licameli 2016-07-07 10:53:12 -04:00
parent 70e0317daa
commit e13ae7d410

View File

@ -334,14 +334,20 @@ bool LabelDialog::TransferDataFromWindow()
// Clear label tracks of labels
for (t = iter.First(); t; t = iter.Next()) {
if (t->GetKind() == Track::Label &&
(!mSelectedTrack || mSelectedTrack == t)) {
LabelTrack *lt = (LabelTrack *)t;
tndx++;
for (i = lt->GetNumLabels() - 1; i >= 0 ; i--) {
lt->DeleteLabel(i);
++tndx;
if (t->GetKind() == Track::Label) {
LabelTrack *lt = static_cast<LabelTrack*>(t);
if (!mSelectedTrack) {
for (i = lt->GetNumLabels() - 1; i >= 0 ; i--) {
lt->DeleteLabel(i);
}
}
else if (mSelectedTrack == lt && mIndex > -1) {
lt->DeleteLabel(mIndex);
}
else
// Do nothing to the nonselected tracks
;
}
}