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>
This commit is contained in:
Danilo Cesar Lemes de Paula 2014-02-26 10:34:16 -03:00 committed by Dirk Hohndel
parent ed12902746
commit 0e6d893dae

View file

@ -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;