Commit c0de3470 authored by Stephan Arts's avatar Stephan Arts

Move to the next image when closing the first image from the image_list

parent 216b407e
......@@ -260,7 +260,14 @@ rstto_image_list_remove_file (RsttoImageList *image_list, GFile *file)
{
if (g_file_equal(rstto_image_list_iter_get_file (iter->data), file))
{
rstto_image_list_iter_previous (iter->data);
if (0 == rstto_image_list_iter_get_position (iter->data))
{
rstto_image_list_iter_next (iter->data);
}
else
{
rstto_image_list_iter_previous (iter->data);
}
/* If the image is still the same,
* it's a single item list,
* and we should force the image in this iter to NULL
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment