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

Method SplitDelete

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

used when we want to use clear only on the labels

Source from the content-addressed store, hash-verified

244#if 0
245//used when we want to use clear only on the labels
246bool LabelTrack::SplitDelete(double b, double e)
247{
248 // May DELETE labels, so use subscripts to iterate
249 for (size_t i = 0, len = mLabels.size(); i < len; ++i) {
250 auto &labelStruct = mLabels[i];
251 LabelStruct::TimeRelations relation =
252 labelStruct.RegionRelation(b, e, this);
253 if (relation == LabelStruct::SURROUNDS_LABEL) {
254 DeleteLabel(i);
255 --i;
256 }
257 else if (relation == LabelStruct::WITHIN_LABEL)
258 labelStruct.selectedRegion.moveT1( - (e-b));
259 else if (relation == LabelStruct::ENDS_IN_LABEL)
260 labelStruct.selectedRegion.setT0(e);
261 else if (relation == LabelStruct::BEGINS_IN_LABEL)
262 labelStruct.selectedRegion.setT1(b);
263 }
264
265 return true;
266}
267#endif
268
269void LabelTrack::ShiftLabelsOnInsert(double length, double pt)

Callers

nothing calls this directly

Calls 4

RegionRelationMethod · 0.80
setT0Method · 0.80
setT1Method · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected