From d7e71ad14a5a219b4a8e0309e862cc73595daf76 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Mon, 30 Aug 2010 12:00:11 +0000 Subject: [PATCH] Fix some little progress calculation bugs --- src/core/organise.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/organise.cpp b/src/core/organise.cpp index 6faeaf72c..18e656426 100644 --- a/src/core/organise.cpp +++ b/src/core/organise.cpp @@ -42,6 +42,7 @@ Organise::Organise(TaskManager* task_manager, eject_after_(eject_after), task_count_(files.count()), transcode_suffix_(1), + tasks_complete_(0), started_(false), task_id_(0), current_copy_progress_(0) @@ -230,7 +231,8 @@ Song::FileType Organise::CheckTranscode(Song::FileType original_type) const { void Organise::SetSongProgress(float progress, bool transcoded) { const int max = transcoded ? 50 : 100; - current_copy_progress_ = qBound(0, int(progress * max), max-1); + current_copy_progress_ = (transcoded ? 50 : 0) + + qBound(0, int(progress * max), max-1); UpdateProgress(); }