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