From 4562223420c983864b2335b0a9bfe8d70993e123 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Wed, 9 Mar 2011 17:21:10 +0000 Subject: [PATCH] [image] Avoid ending up with multiple selected images on re-registration Signed-off-by: Michael Brown --- src/core/image.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/image.c b/src/core/image.c index 01091f1b..86c264c2 100644 --- a/src/core/image.c +++ b/src/core/image.c @@ -128,6 +128,12 @@ int register_image ( struct image *image ) { imgindex++ ); } + /* Avoid ending up with multiple "selected" images on + * re-registration + */ + if ( image_find_selected() ) + image->flags &= ~IMAGE_SELECTED; + /* Add to image list */ image_get ( image ); image->flags |= IMAGE_REGISTERED;