mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-08 07:42:39 +02:00
Bug 753 - Sort Tracks by Name may misbehave with stereo tracks.
This commit is contained in:
parent
e23acb39eb
commit
fab1a2778b
@ -2815,9 +2815,14 @@ void AudacityProject::SortTracks(int flags)
|
|||||||
ndx++;
|
ndx++;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
bool bArrayTrackLinked = false;
|
||||||
for (ndx = 0; ndx < arr.size(); ++ndx) {
|
for (ndx = 0; ndx < arr.size(); ++ndx) {
|
||||||
Track &arrTrack = **arr[ndx];
|
Track &arrTrack = **arr[ndx];
|
||||||
if(flags & kAudacitySortByName) {
|
// Don't insert between channels of a stereo track!
|
||||||
|
if( bArrayTrackLinked ){
|
||||||
|
bArrayTrackLinked = false;
|
||||||
|
}
|
||||||
|
else if(flags & kAudacitySortByName) {
|
||||||
//do case insensitive sort - cmpNoCase returns less than zero if the string is 'less than' its argument
|
//do case insensitive sort - cmpNoCase returns less than zero if the string is 'less than' its argument
|
||||||
//also if we have case insensitive equality, then we need to sort by case as well
|
//also if we have case insensitive equality, then we need to sort by case as well
|
||||||
//We sort 'b' before 'B' accordingly. We uncharacteristically use greater than for the case sensitive
|
//We sort 'b' before 'B' accordingly. We uncharacteristically use greater than for the case sensitive
|
||||||
@ -2864,6 +2869,7 @@ void AudacityProject::SortTracks(int flags)
|
|||||||
|
|
||||||
ndx+=candidatesLookedAt;
|
ndx+=candidatesLookedAt;
|
||||||
}
|
}
|
||||||
|
bArrayTrackLinked = arrTrack.GetLinked();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
arr.insert(arr.begin() + ndx, iter);
|
arr.insert(arr.begin() + ndx, iter);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user