hob: fix loading customised image recipe

The signal handler of the 'Base image' combo was still connected during load
such that updating the UI to reflect the loaded base image triggered a change
of the model. Fix this by disconnecting the signal handler when updating the
displayed 'Base image'.

Fixes [YOCTO #1282]

(Bitbake rev: 58036a79cb79d1dff307e2cfed0e684493178507)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Joshua Lock 2011-07-26 17:44:34 -07:00 committed by Richard Purdie
parent 6b109860bf
commit b004d8ef0f
2 changed files with 7 additions and 1 deletions

View File

@ -281,7 +281,7 @@ class TaskListModel(gtk.ListStore):
path = self.get_path(it)
name = self[path][self.COL_NAME]
if name in packages:
self.include_item(path)
self.include_item(path, binb="User Selected")
packages.remove(name)
it = self.iter_next(it)

View File

@ -122,6 +122,10 @@ class MainWindow (gtk.Window):
self.build_succeeded = False
def image_changed_string_cb(self, model, new_image):
# disconnect the image combo's signal handler
if self.image_combo_id:
self.image_combo.disconnect(self.image_combo_id)
self.image_combo_id = None
cnt = 0
it = self.model.images.get_iter_first()
while it:
@ -131,6 +135,8 @@ class MainWindow (gtk.Window):
break
it = self.model.images.iter_next(it)
cnt = cnt + 1
# Reconnect the signal handler
self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb)
def image_changed_cb(self, combo):
model = self.image_combo.get_model()