diff options
-rw-r--r-- | bitbake/lib/bb/ui/hob.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/hob.py b/bitbake/lib/bb/ui/hob.py index b8842a9b0c..5a4ac7850d 100644 --- a/bitbake/lib/bb/ui/hob.py +++ b/bitbake/lib/bb/ui/hob.py | |||
@@ -158,7 +158,8 @@ class MainWindow (gtk.Window): | |||
158 | it = self.model.images.iter_next(it) | 158 | it = self.model.images.iter_next(it) |
159 | cnt = cnt + 1 | 159 | cnt = cnt + 1 |
160 | # Reconnect the signal handler | 160 | # Reconnect the signal handler |
161 | self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb) | 161 | if not self.image_combo_id: |
162 | self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb) | ||
162 | 163 | ||
163 | def image_changed_cb(self, combo): | 164 | def image_changed_cb(self, combo): |
164 | model = self.image_combo.get_model() | 165 | model = self.image_combo.get_model() |
@@ -321,11 +322,13 @@ class MainWindow (gtk.Window): | |||
321 | return | 322 | return |
322 | 323 | ||
323 | def reset_build(self): | 324 | def reset_build(self): |
324 | self.image_combo.disconnect(self.image_combo_id) | 325 | if self.image_combo_id: |
325 | self.image_combo_id = None | 326 | self.image_combo.disconnect(self.image_combo_id) |
327 | self.image_combo_id = None | ||
326 | self.image_combo.set_active(-1) | 328 | self.image_combo.set_active(-1) |
327 | self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb) | ||
328 | self.model.reset() | 329 | self.model.reset() |
330 | if not self.image_combo_id: | ||
331 | self.image_combo_id = self.image_combo.connect("changed", self.image_changed_cb) | ||
329 | 332 | ||
330 | def layers_cb(self, action): | 333 | def layers_cb(self, action): |
331 | resp = self.layers.run() | 334 | resp = self.layers.run() |