Merge pull request #685 from kelciour/synclog-last-line-scroll

Scroll media sync log to the last line
This commit is contained in:
Damien Elmes 2020-07-13 13:01:48 +10:00 committed by GitHub
commit 360622afdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,7 +19,7 @@ from anki.rsbackend import (
from anki.types import assert_impossible
from anki.utils import intTime
from aqt import gui_hooks
from aqt.qt import QDialog, QDialogButtonBox, QPushButton, QTimer, qconnect
from aqt.qt import QDialog, QDialogButtonBox, QPushButton, QTextCursor, QTimer, qconnect
from aqt.utils import showWarning, tr
LogEntry = Union[MediaSyncProgress, str]
@ -176,6 +176,7 @@ class MediaSyncDialog(QDialog):
self.form.plainTextEdit.setPlainText(
"\n".join(self._entry_to_text(x) for x in syncer.entries())
)
self.form.plainTextEdit.moveCursor(QTextCursor.End)
self.show()
def reject(self) -> None: