MCPcopy Create free account
hub / github.com/audacity/audacity / ShiftLabelsOnInsert

Method ShiftLabelsOnInsert

libraries/lib-label-track/LabelTrack.cpp:269–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

267#endif
268
269void LabelTrack::ShiftLabelsOnInsert(double length, double pt)
270{
271 for (auto &labelStruct: mLabels) {
272 LabelStruct::TimeRelations relation =
273 labelStruct.RegionRelation(pt, pt, this);
274
275 if (relation == LabelStruct::BEFORE_LABEL)
276 labelStruct.selectedRegion.move(length);
277 else if (relation == LabelStruct::WITHIN_LABEL)
278 labelStruct.selectedRegion.moveT1(length);
279 }
280}
281
282void LabelTrack::ChangeLabelsOnReverse(double b, double e)
283{

Callers 1

OnPasteFunction · 0.80

Calls 2

RegionRelationMethod · 0.80
moveMethod · 0.80

Tested by

no test coverage detected