From 4ae63de59d426f06d03c6e1ba678cc472599c936 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 13 Oct 2011 23:45:32 +0200 Subject: Set focus and redraw slide after image import --- src/mainwindow.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/mainwindow.c') diff --git a/src/mainwindow.c b/src/mainwindow.c index 7301fe3..f671736 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -1002,14 +1002,19 @@ static void dnd_receive(GtkWidget *widget, GdkDragContext *drag_context, filename = g_filename_from_uri(uri, NULL, &error); if ( filename != NULL ) { + struct object *o; + gtk_drag_finish(drag_context, TRUE, FALSE, time); chomp(filename); - add_image_object(p->view_slide, - p->start_corner_x, p->start_corner_y, - p->import_width, p->import_height, - filename, - p->ss->styles[0], p->image_store, - p->image_tool); + o = add_image_object(p->view_slide, + p->start_corner_x, + p->start_corner_y, + p->import_width, p->import_height, + filename, + p->ss->styles[0], p->image_store, + p->image_tool); + p->editing_object = o; + redraw_object(o); /* Don't free "filename" - it's now owned by the * image store. */ -- cgit v1.2.3