forked from mia/Aegisub
Don't animate the progress bar when moving backwards
This commit is contained in:
parent
cf6e274c49
commit
ad8d11d87f
1 changed files with 6 additions and 1 deletions
|
@ -199,7 +199,12 @@ void DialogProgress::OnShow(wxShowEvent&) {
|
|||
}
|
||||
|
||||
void DialogProgress::OnIdle(wxIdleEvent&) {
|
||||
if (progress_current != progress_target) {
|
||||
if (progress_current > progress_target) {
|
||||
progress_current = progress_target;
|
||||
gauge->SetValue(progress_current);
|
||||
set_taskbar_progress(progress_current / 3);
|
||||
}
|
||||
else if (progress_current < progress_target) {
|
||||
using namespace std::chrono;
|
||||
auto now = steady_clock::now();
|
||||
int ms = mid<int>(0, duration_cast<milliseconds>(now - progress_anim_start_time).count(), progress_anim_duration);
|
||||
|
|
Loading…
Reference in a new issue