| 453 | } |
| 454 | |
| 455 | void EffectChangeSpeed::Update_TimeCtrl_ToLength() |
| 456 | // Update ToLength control from percent change. |
| 457 | { |
| 458 | mToLength = (mFromLength * 100.0) / (100.0 + m_PercentChange); |
| 459 | |
| 460 | // Set the format first so we can get sample accuracy. |
| 461 | mpToLengthCtrl->SetFormatName(mFormat); |
| 462 | // Negative times do not make sense. |
| 463 | // 359999 = 99h:59m:59s which is a little less disturbing than overflow characters |
| 464 | // though it may still look a bit strange with some formats. |
| 465 | mToLength = std::clamp<double>(mToLength, 0.0, 359999.0); |
| 466 | mpToLengthCtrl->SetValue(mToLength); |
| 467 | } |
| 468 | |
| 469 | void EffectChangeSpeed::UpdateUI() |
| 470 | // Disable OK and Preview if not in sensible range. |
nothing calls this directly
no test coverage detected