aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>2014-02-26 10:34:16 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-26 09:00:19 -0800
commit0e6d893daed6eef53263ddafbc2f1d6e0e29da26 (patch)
treed449e50b6195286c2e296aaf1de56ac5082488b6
parented129027461511fc084a978d8c3573fe5abd2bee (diff)
downloadsubsurface-0e6d893daed6eef53263ddafbc2f1d6e0e29da26.tar.gz
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 <danilo.eu@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--libdivecomputer.c4
1 files changed, 3 insertions, 1 deletions
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;