| 456 | } |
| 457 | |
| 458 | void VTimeLineControl::updateDuration( void ) |
| 459 | { |
| 460 | if ( !mController ) |
| 461 | { |
| 462 | // No Controller. |
| 463 | return; |
| 464 | } |
| 465 | |
| 466 | // Add 500ms. |
| 467 | const S32 length = toPoint( mController->getDuration() + 500 ); |
| 468 | |
| 469 | // Set Min Extent. |
| 470 | setMinExtent( Point2I( length, getHeight() ) ); |
| 471 | |
| 472 | if ( getWidth() < length ) |
| 473 | { |
| 474 | // Conform to Min Extent. |
| 475 | setExtent( length, getHeight() ); |
| 476 | } |
| 477 | } |
no test coverage detected