From patchwork Sun Apr 1 12:14:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel, 08/10] Hob: Check "dummy" image while update_image_combo Date: Sun, 01 Apr 2012 12:14:16 -0000 From: Dongxiao Xu X-Patchwork-Id: 25025 Message-Id: To: bitbake-devel@lists.openembedded.org We also need to check if the selected image is "Create your own image" and set it as active. Besides, to avoid the impact of set_active(), we need to move the connect signal in the end of the update_image_combo() function. Signed-off-by: Dongxiao Xu --- lib/bb/ui/crumbs/imageconfigurationpage.py | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/lib/bb/ui/crumbs/imageconfigurationpage.py b/lib/bb/ui/crumbs/imageconfigurationpage.py index 30f8979..9271c48 100644 --- a/lib/bb/ui/crumbs/imageconfigurationpage.py +++ b/lib/bb/ui/crumbs/imageconfigurationpage.py @@ -338,11 +338,17 @@ class ImageConfigurationPage (HobPage): active = cnt cnt = cnt + 1 self.image_combo.append_text(self.builder.recipe_model.__dummy_image__) - self._image_combo_connect_signal() + if selected_image == self.builder.recipe_model.__dummy_image__: + active = cnt self.image_combo.set_active(-1) self.image_combo.set_active(active) + if active != -1: + self.show_baseimg_selected() + + self._image_combo_connect_signal() + def layer_button_clicked_cb(self, button): # Create a layer selection dialog self.builder.show_layer_selection_dialog()