diff options
author | Thomas White <taw@bitwiz.org.uk> | 2011-10-13 23:45:32 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2011-10-13 23:45:32 +0200 |
commit | 4ae63de59d426f06d03c6e1ba678cc472599c936 (patch) | |
tree | 0c4914270dbeb30a91b7db57b41a430c7d47ce3d /src/mainwindow.c | |
parent | f663680514da83368464df0020d9c2e04ef770c8 (diff) |
Set focus and redraw slide after image import
Diffstat (limited to 'src/mainwindow.c')
-rw-r--r-- | src/mainwindow.c | 17 |
1 files changed, 11 insertions, 6 deletions
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. */ |