Patchwork [bitbake-devel,2/2] Hob: In building log page, fixed the issue about 'endpath' not clear when next to start build

login
register
mail settings
Submitter Shane Wang
Date March 30, 2012, 9:12 a.m.
Message ID <f342b5c8dd757153a834361277fa92f4e6cf130d.1333098599.git.shane.wang@intel.com>
Download mbox | patch
Permalink /patch/24913/
State New
Headers show

Comments

Shane Wang - March 30, 2012, 9:12 a.m.
From: Liming An <limingx.l.an@intel.com>

Fixed the issue about the building log scrollbar can not auto scroll to page end sometimes

[YOCTO #2098]

Signed-off-by: Liming An <limingx.l.an@intel.com>
---
 bitbake/lib/bb/ui/crumbs/builddetailspage.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Patch

diff --git a/bitbake/lib/bb/ui/crumbs/builddetailspage.py b/bitbake/lib/bb/ui/crumbs/builddetailspage.py
index 1440039..aee258a 100755
--- a/bitbake/lib/bb/ui/crumbs/builddetailspage.py
+++ b/bitbake/lib/bb/ui/crumbs/builddetailspage.py
@@ -172,6 +172,7 @@  class BuildDetailsPage (HobPage):
 
     def reset_build_status(self):
         self.task_status.set_markup("\n") # to ensure layout is correct
+        self.endpath = (0,)
 
     def show_issues(self):
         self.num_of_issues += 1
@@ -234,7 +235,8 @@  class BuildDetailsPage (HobPage):
         if treeview and v_adj:
             if path[0] > self.endpath[0]: # check the event is a new row append or not
                 self.endpath = path
-                if v_adj.value == (v_adj.upper - v_adj.page_size): # check the gtk.adjustment position is at end boundary or not
+                # check the gtk.adjustment position is at end boundary or not
+                if (v_adj.upper <= v_adj.page_size) or (v_adj.value == v_adj.upper - v_adj.page_size):
                     treeview.scroll_to_cell(path)
 
     def show_configurations(self, configurations, params):