mirror of
https://github.com/LorenEteval/Furious.git
synced 2026-09-30 10:58:09 +03:00
Fix log truncation bug if user cursor is present
Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
@@ -281,12 +281,8 @@ class LogViewerWidget(MainWindow):
|
||||
vScrollBar = textBrowser.verticalScrollBar()
|
||||
scrollEnds = vScrollBar.maximum() - vScrollBar.value() <= 10
|
||||
|
||||
if line.endswith('\n'):
|
||||
textBrowser.insertPlainText(line)
|
||||
else:
|
||||
textBrowser.append(line)
|
||||
|
||||
APP().processEvents()
|
||||
# Fix insertPlainText bug if user cursor is present
|
||||
textBrowser.append(line.rstrip())
|
||||
|
||||
if scrollEnds:
|
||||
vScrollBar.setValue(vScrollBar.maximum()) # Scrolls to the bottom
|
||||
|
||||
Reference in New Issue
Block a user