Commit ddaa9133 authored by Davis King's avatar Davis King

Minor improvements.

parent 24082349
...@@ -63,7 +63,7 @@ metadata_editor( ...@@ -63,7 +63,7 @@ metadata_editor(
// set the size of this window. // set the size of this window.
on_window_resized(); on_window_resized();
load_image_and_set_size(image_pos); load_image_and_set_size(0);
on_window_resized(); on_window_resized();
if (image_pos < lb_images.size() ) if (image_pos < lb_images.size() )
lb_images.select(image_pos); lb_images.select(image_pos);
...@@ -234,9 +234,14 @@ select_image( ...@@ -234,9 +234,14 @@ select_image(
lb_images.select(idx); lb_images.select(idx);
image_pos = idx;
load_image(idx); load_image(idx);
} }
else
{
display.clear_overlay();
array2d<unsigned char> empty_img;
display.set_image(empty_img);
}
} }
// ---------------------------------------------------------------------------------------- // ----------------------------------------------------------------------------------------
...@@ -246,7 +251,6 @@ on_lb_images_clicked( ...@@ -246,7 +251,6 @@ on_lb_images_clicked(
unsigned long idx unsigned long idx
) )
{ {
image_pos = idx;
load_image(idx); load_image(idx);
} }
...@@ -276,6 +280,8 @@ load_image( ...@@ -276,6 +280,8 @@ load_image(
if (idx >= metadata.images.size()) if (idx >= metadata.images.size())
return; return;
image_pos = idx;
array2d<rgb_pixel> img; array2d<rgb_pixel> img;
display.clear_overlay(); display.clear_overlay();
try try
...@@ -302,6 +308,8 @@ load_image_and_set_size( ...@@ -302,6 +308,8 @@ load_image_and_set_size(
if (idx >= metadata.images.size()) if (idx >= metadata.images.size())
return; return;
image_pos = idx;
array2d<rgb_pixel> img; array2d<rgb_pixel> img;
display.clear_overlay(); display.clear_overlay();
try try
......
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