MCPcopy Create free account
hub / github.com/LMMS/lmms / cloneTrack

Method cloneTrack

src/core/Track.cpp:1808–1822  ·  view source on GitHub ↗

! \brief Clone this track * */

Source from the content-addressed store, hash-verified

1806 *
1807 */
1808void TrackOperationsWidget::cloneTrack()
1809{
1810 TrackContainerView *tcView = m_trackView->trackContainerView();
1811
1812 Track *newTrack = m_trackView->getTrack()->clone();
1813 TrackView *newTrackView = tcView->createTrackView( newTrack );
1814
1815 int index = tcView->trackViews().indexOf( m_trackView );
1816 int i = tcView->trackViews().size();
1817 while ( i != index + 1 )
1818 {
1819 tcView->moveTrackView( newTrackView, i - 1 );
1820 i--;
1821 }
1822}
1823
1824
1825/*! \brief Clear this track - clears all TCOs from the track */

Callers

nothing calls this directly

Calls 6

cloneMethod · 0.80
createTrackViewMethod · 0.80
moveTrackViewMethod · 0.80
trackContainerViewMethod · 0.45
getTrackMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected