Skip to content

Commit

Permalink
fixed unnecessary image reloads in color menu
Browse files Browse the repository at this point in the history
  • Loading branch information
nadvornik committed Sep 6, 2009
1 parent e0fd3c7 commit 687a891
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/layout_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,8 @@ static void layout_color_menu_enable_cb(GtkToggleAction *action, gpointer data)
#ifdef HAVE_LCMS
LayoutWindow *lw = data;

if (layout_image_color_profile_get_use(lw) == gtk_toggle_action_get_active(action)) return;

layout_image_color_profile_set_use(lw, gtk_toggle_action_get_active(action));
layout_util_sync_color(lw);
layout_image_refresh(lw);
Expand All @@ -1099,6 +1101,7 @@ static void layout_color_menu_use_image_cb(GtkToggleAction *action, gpointer dat
gboolean use_image;

if (!layout_image_color_profile_get(lw, &input, &use_image)) return;
if (use_image == gtk_toggle_action_get_active(action)) return;
layout_image_color_profile_set(lw, input, gtk_toggle_action_get_active(action));
layout_util_sync_color(lw);
layout_image_refresh(lw);
Expand Down

0 comments on commit 687a891

Please sign in to comment.