mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-24 16:20: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:
parent
70e0317daa
commit
e13ae7d410
@ -334,14 +334,20 @@ bool LabelDialog::TransferDataFromWindow()
|
|||||||
|
|
||||||
// Clear label tracks of labels
|
// Clear label tracks of labels
|
||||||
for (t = iter.First(); t; t = iter.Next()) {
|
for (t = iter.First(); t; t = iter.Next()) {
|
||||||
if (t->GetKind() == Track::Label &&
|
++tndx;
|
||||||
(!mSelectedTrack || mSelectedTrack == t)) {
|
if (t->GetKind() == Track::Label) {
|
||||||
LabelTrack *lt = (LabelTrack *)t;
|
LabelTrack *lt = static_cast<LabelTrack*>(t);
|
||||||
tndx++;
|
if (!mSelectedTrack) {
|
||||||
|
for (i = lt->GetNumLabels() - 1; i >= 0 ; i--) {
|
||||||
for (i = lt->GetNumLabels() - 1; i >= 0 ; i--) {
|
lt->DeleteLabel(i);
|
||||||
lt->DeleteLabel(i);
|
}
|
||||||
}
|
}
|
||||||
|
else if (mSelectedTrack == lt && mIndex > -1) {
|
||||||
|
lt->DeleteLabel(mIndex);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
// Do nothing to the nonselected tracks
|
||||||
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user