! \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. * */
| 463 | * |
| 464 | */ |
| 465 | void 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 |
no test coverage detected