mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-27 22:03:20 +02:00
Ensure jobs log viewer stay at bottom when appending
This commit is contained in:
parent
13e5fc5011
commit
2e47370680
1 changed files with 4 additions and 0 deletions
|
|
@ -489,7 +489,11 @@ def update(self):
|
|||
more = f.read()
|
||||
self.next_pos = f.tell()
|
||||
if more:
|
||||
v = self.log.verticalScrollBar()
|
||||
atbottom = v.value() >= v.maximum() - 1
|
||||
self.log.appendPlainText(more.decode('utf-8', 'replace'))
|
||||
if atbottom:
|
||||
v.setValue(v.maximum())
|
||||
# }}}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue