From 7aa809718e77504d9ebccde25c3f06770f768384 Mon Sep 17 00:00:00 2001 From: Vasily_Makarov Date: Fri, 10 Jun 2011 13:40:53 +0400 Subject: saedit: Add forgotten clearing of ground pixbuf --- saedit/main.c | 3 +-- saedit/main.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'saedit') diff --git a/saedit/main.c b/saedit/main.c index d001208..97e5320 100644 --- a/saedit/main.c +++ b/saedit/main.c @@ -48,7 +48,7 @@ gboolean on_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data cairo_t *cr = gdk_cairo_create(widget->window); - cairo_set_source_surface(cr, get_grid_surface(w, h), width/2 - GRID_SIZE * (w + 2) * 0.5, height/2 - GRID_SIZE * ((h + 2) * 0.5 - 0.5)); + cairo_set_source_surface(cr, get_grid_surface(w, h), width/2 - GRID_SIZE * (w + 2) * 0.5, height/2 - GRID_SIZE * (h + 2) * 0.5); cairo_paint(cr); GdkPixbuf *pbuf = get_sprite_by_index(current_sprite->index); @@ -81,7 +81,6 @@ void open_xml_file(GtkButton *button, gpointer buffer) { } void free_imagesets() { - imageset->spriteset = NULL; imageset = imageset_info_new(); imagesets = NULL; gtk_list_store_clear(GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(imagesetscombobox)))); diff --git a/saedit/main.h b/saedit/main.h index 345cc23..53314f0 100644 --- a/saedit/main.h +++ b/saedit/main.h @@ -47,6 +47,7 @@ typedef struct { static imageset_info *imageset_info_new() { imageset_info *res = g_new0(imageset_info, 1); res->ground = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, GRID_SIZE * 3, GRID_SIZE * 3); + gdk_pixbuf_fill(res->ground, 0x00000000); return res; } -- cgit v1.2.3-70-g09d2