Skip to content

Commit 70af436

Browse files
committed
update background menu on new image
1 parent 8c3d4a6 commit 70af436

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/displaybar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131

3232
/*
3333
#define DEBUG_VERBOSE
34-
*/
3534
#define DEBUG
35+
*/
3636

3737
typedef struct _ViewSettings {
3838
gboolean valid;

src/imagewindow.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -535,8 +535,6 @@ imagewindow_imageui_set_visible(Imagewindow *win,
535535

536536
VipsImage *image;
537537

538-
printf("imagewindow_imageui_set_visible:\n");
539-
540538
if (old_tilesource)
541539
g_object_set(old_tilesource,
542540
"visible", FALSE,
@@ -621,6 +619,14 @@ imagewindow_imageui_set_visible(Imagewindow *win,
621619

622620
// update the menus
623621
imagewindow_tilesource_changed(new_tilesource, win);
622+
623+
TilecacheBackground background;
624+
g_object_get(win->imageui,
625+
"background", &background,
626+
NULL);
627+
const char *name = vips_enum_nick(TILECACHE_BACKGROUND_TYPE, background);
628+
GVariant *state = g_variant_new_string(name);
629+
change_state(GTK_WIDGET(win), "background", state);
624630
}
625631

626632
static void

0 commit comments

Comments
 (0)