mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Ensure jobs log viewer stay at bottom when appending
This commit is contained in:
parent
d428e01d2a
commit
a67fcb81f1
@ -489,7 +489,11 @@ class DetailView(Dialog): # {{{
|
|||||||
more = f.read()
|
more = f.read()
|
||||||
self.next_pos = f.tell()
|
self.next_pos = f.tell()
|
||||||
if more:
|
if more:
|
||||||
|
v = self.log.verticalScrollBar()
|
||||||
|
atbottom = v.value() >= v.maximum() - 1
|
||||||
self.log.appendPlainText(more.decode('utf-8', 'replace'))
|
self.log.appendPlainText(more.decode('utf-8', 'replace'))
|
||||||
|
if atbottom:
|
||||||
|
v.setValue(v.maximum())
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user