Skip to content

Commit

Permalink
Control jobs/import: properly update the progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
aurelienpierre committed Feb 6, 2025
1 parent bbfc2fa commit 086d62b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/control/jobs/control_jobs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2371,8 +2371,7 @@ gboolean _import_image(const GList *img, dt_control_import_t *data, const int in
void _refresh_progress_counter(dt_job_t *job, const int elements, const int index)
{
gchar message[32] = { 0 };
double fraction = 0.0f;
fraction += 1.0f / (double) elements;
double fraction = (double)index / (double)elements;
snprintf(message, sizeof(message), ngettext("importing %i/%i image", "importing %i/%i images", index), index, elements);
dt_control_job_set_progress_message(job, message);
dt_control_job_set_progress(job, fraction);
Expand Down

0 comments on commit 086d62b

Please sign in to comment.