Skip to content

Commit

Permalink
prevent infinite redraw cycle while liquify module expanded
Browse files Browse the repository at this point in the history
Currently, gui_post_expose causes an update of the label containing
the warp/node count, which causes a global "draw" event, which
eventually results in liquify's gui_post_expose function being called,
which again updates the label....
  • Loading branch information
ralfbrown authored and TurboGit committed Dec 12, 2024
1 parent e058549 commit 53eeb52
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/iop/liquify.c
Original file line number Diff line number Diff line change
Expand Up @@ -1711,7 +1711,11 @@ static void update_warp_count(dt_iop_module_t *self)
}
char str[10];
snprintf(str, sizeof(str), "%u | %u", warp, node);
gtk_label_set_text(g->label, str);
// update the label, but only if it has changed -- otherwise we get
// into an infinite redraw loop while the module is visible and
// expanded
if(strcmp(str,gtk_label_get_text(g->label)) != 0)
gtk_label_set_text(g->label, str);
}

static GList *interpolate_paths(dt_iop_liquify_params_t *p)
Expand Down

0 comments on commit 53eeb52

Please sign in to comment.