mirror of
https://github.com/kovidgoyal/calibre.git
synced 2026-05-30 10:35:20 -04:00
Ensure jobs log viewer stay at bottom when appending
This commit is contained in:
@@ -489,7 +489,11 @@ class DetailView(Dialog): # {{{
|
||||
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())
|
||||
# }}}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user