summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2011-07-07 15:43:25 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-08 17:32:40 +0100
commitb2124617ab91acafa1078d1f42207db9489ef717 (patch)
treebcb0d444b8a193fa12322d70b92dabcdf7c6f568 /bitbake/lib
parentfb24f9b37ca2cd5ab53330cdbe6630f5c36e3744 (diff)
downloadpoky-b2124617ab91acafa1078d1f42207db9489ef717.tar.gz
ui/crumbs/tasklistmodel: fix reset method
The reset() method only touched the contents sub-model, which does not include the selected image(s). This patch ensures that reset correctly unsets any image selection when called. Further we re-initialise the COL_IMG column when resetting packages. (Bitbake rev: f3fbc97471961042e5eb8224dc07dcc04293efcf) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/ui/crumbs/tasklistmodel.py20
1 files changed, 16 insertions, 4 deletions
diff --git a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py
index d9829861bb..5e979b7e2f 100644
--- a/bitbake/lib/bb/ui/crumbs/tasklistmodel.py
+++ b/bitbake/lib/bb/ui/crumbs/tasklistmodel.py
@@ -429,12 +429,24 @@ class TaskListModel(gtk.ListStore):
429 Empty self.contents by setting the include of each entry to None 429 Empty self.contents by setting the include of each entry to None
430 """ 430 """
431 def reset(self): 431 def reset(self):
432 # Deselect images - slightly more complex logic so that we don't
433 # have to iterate all of the contents of the main model, instead
434 # just iterate the images model.
435 if self.selected_image:
436 iit = self.images.get_iter_first()
437 while iit:
438 pit = self.images.convert_iter_to_child_iter(iit)
439 self.set(pit, self.COL_INC, False)
440 iit = self.images.iter_next(iit)
441 self.selected_image = None
442
432 it = self.contents.get_iter_first() 443 it = self.contents.get_iter_first()
433 while it: 444 while it:
434 path = self.contents.get_path(it) 445 oit = self.contents.convert_iter_to_child_iter(it)
435 opath = self.contents.convert_path_to_child_path(path) 446 self.set(oit,
436 self[opath][self.COL_INC] = False 447 self.COL_INC, False,
437 self[opath][self.COL_BINB] = "" 448 self.COL_BINB, "",
449 self.COL_IMG, False)
438 # As we've just removed the first item... 450 # As we've just removed the first item...
439 it = self.contents.get_iter_first() 451 it = self.contents.get_iter_first()
440 452