From 0e6d893daed6eef53263ddafbc2f1d6e0e29da26 Mon Sep 17 00:00:00 2001 From: Danilo Cesar Lemes de Paula Date: Wed, 26 Feb 2014 10:34:16 -0300 Subject: set the download progress bar to zero after a download Before that, the behaviour was that in case of an error or a re-download, the progress bar would appear for a few milliseconds with the old value. Signed-off-by: Danilo Cesar Lemes de Paula Signed-off-by: Dirk Hohndel --- libdivecomputer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libdivecomputer.c b/libdivecomputer.c index 7cc3894f9..9f4f545ce 100644 --- a/libdivecomputer.c +++ b/libdivecomputer.c @@ -710,8 +710,10 @@ static const char *do_device_import(device_data_t *data) rc = dc_device_foreach(device, dive_cb, data); } - if (rc != DC_STATUS_SUCCESS) + if (rc != DC_STATUS_SUCCESS) { + progress_bar_fraction = 0.0; return translate("gettextFromC","Dive data import error"); + } /* All good */ return NULL; -- cgit v1.2.3-70-g09d2