MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / addTracksToSelection

Method addTracksToSelection

Engine/TrackerContext.cpp:568–596  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

566}
567
568void
569TrackerContext::addTracksToSelection(const std::list<TrackMarkerPtr>& marks,
570 TrackSelectionReason reason)
571{
572 bool hasCalledBegin = false;
573 {
574 QMutexLocker k(&_imp->trackerContextMutex);
575
576 if (!_imp->beginSelectionCounter) {
577 k.unlock();
578 Q_EMIT selectionAboutToChange( (int)reason );
579 k.relock();
580 _imp->incrementSelectionCounter();
581 hasCalledBegin = true;
582 }
583
584 for (std::list<TrackMarkerPtr>::const_iterator it = marks.begin(); it != marks.end(); ++it) {
585 _imp->addToSelectionList(*it);
586 }
587
588 if (hasCalledBegin) {
589 _imp->decrementSelectionCounter();
590 }
591 }
592
593 if (hasCalledBegin) {
594 endSelection(reason);
595 }
596}
597
598void
599TrackerContext::removeTrackFromSelection(const TrackMarkerPtr& mark,

Callers 4

onResetButtonClickedMethod · 0.80
selectInternalMethod · 0.80

Calls 6

addToSelectionListMethod · 0.80
unlockMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected