on xenial help sign in
Cimi is scared total may be <= 0
commitb77f4d4849dce62339028bba004d1d1f915aecd8 authorAlbert Astals <albert.astals@canonical.com> dateWed 12 Feb 2014, 17:20 (13 years ago) parente02edb8
1 file changed+7−2
qml/Dash/Previews/PreviewProgress.qml+7−2
qml/Dash/Previews/PreviewProgress.qml+7−2
@@ -49,8 +49,13 @@ PreviewWidget {
4949 dbusPath: progressBar.source["dbus-object"] || ""
5050
5151 onProgress: {
52− var percentage = parseInt(received * 100 / total);
53− progressBar.value = percentage;
52+ if (total <= 0) {
53+ progressBar.indeterminate = true;
54+ } else {
55+ progressBar.indeterminate = false;
56+ var percentage = parseInt(received * 100 / total);
57+ progressBar.value = percentage;
58+ }
5459 }
5560
5661 onFinished: {