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

Method updateLength

src/core/Track.cpp:465–479  ·  view source on GitHub ↗

! \brief Updates a trackContentObjectView's length * * If this track content object view has a fixed TCO, then we must * keep the width of our parent. Otherwise, calculate our width from * the track content object's length in pixels adding in the border. * */

Source from the content-addressed store, hash-verified

463 *
464 */
465void TrackContentObjectView::updateLength()
466{
467 if( fixedTCOs() )
468 {
469 setFixedWidth( parentWidget()->width() );
470 }
471 else
472 {
473 setFixedWidth(
474 static_cast<int>( m_tco->length() * pixelsPerTact() /
475 MidiTime::ticksPerTact() ) + 1 /*+
476 TCO_BORDER_WIDTH * 2-1*/ );
477 }
478 m_trackView->trackContainerView()->update();
479}
480
481
482

Callers 3

movePositionMethod · 0.45
changeLengthMethod · 0.45
removeTCOMethod · 0.45

Calls 5

fixedTCOsFunction · 0.85
ticksPerTactFunction · 0.85
lengthMethod · 0.45
updateMethod · 0.45
trackContainerViewMethod · 0.45

Tested by

no test coverage detected