Patchwork [bitbake-devel] hob: fixes for image combo box

login
register
mail settings
Submitter Cristiana Voicu
Date Aug. 27, 2013, 10:27 a.m.
Message ID <1377599257-29089-1-git-send-email-cristiana.voicu@intel.com>
Download mbox | patch
Permalink /patch/56705/
State New
Headers show

Comments

Cristiana Voicu - Aug. 27, 2013, 10:27 a.m.
When an image from scratch is selected, and recipes parsing
is canceled, the image shown by the combo box isn't correct.

[YOCTO #5000]
Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
---
 bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
index ca168bc..060fee2 100644
--- a/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
+++ b/bitbake/lib/bb/ui/crumbs/imageconfigurationpage.py
@@ -496,16 +496,15 @@  class ImageConfigurationPage (HobPage):
                 cnt = cnt + 1
         self.image_combo.append_text(self.builder.recipe_model.__custom_image__)
 
+        if selected_image == self.builder.recipe_model.__custom_image__:
+            active = cnt
+
         if self.custom_image_selected:
             self.image_combo.append_text("--Separator--")
-            cnt = cnt + 1
             self.image_combo.append_text(self.custom_image_selected)
+            cnt = cnt + 2
             if self.custom_image_selected == selected_image:
                 active = cnt
-            cnt = cnt + 1
-
-        if selected_image == self.builder.recipe_model.__custom_image__:
-            active = cnt
 
         self.image_combo.set_active(active)