diff --git a/src/tasks/Task.cpp b/src/tasks/Task.cpp index 8ab0dedcd..a48eab7e7 100644 --- a/src/tasks/Task.cpp +++ b/src/tasks/Task.cpp @@ -13,6 +13,8 @@ void Task::AddTaskListener(TaskListener * listener) { this->listener = listener; + notifyProgressMain(); + notifyStatusMain(); } void Task::Start() diff --git a/src/tasks/TaskWindow.cpp b/src/tasks/TaskWindow.cpp index 910e11a52..8958e1a23 100644 --- a/src/tasks/TaskWindow.cpp +++ b/src/tasks/TaskWindow.cpp @@ -99,8 +99,11 @@ void TaskWindow::OnDraw() if(progress!=-1) { - float size = float(Size.X-4)*(float(progress)/100.0f); // TIL... - g->fillrect(Position.X + 2, Position.Y + Size.Y-15, size, 13, progressBarColour.Red, progressBarColour.Green, progressBarColour.Blue, 255); + if(progress > 0) + { + float size = float(Size.X-4)*(float(progress)/100.0f); // TIL... + g->fillrect(Position.X + 2, Position.Y + Size.Y-15, size, 13, progressBarColour.Red, progressBarColour.Green, progressBarColour.Blue, 255); + } } else { int size = 40, rsize = 0; float position = float(Size.X-4)*(intermediatePos/100.0f);