From b849df9f7f5d38d6a1a8d24137c248c50dd70910 Mon Sep 17 00:00:00 2001 From: Elliott Liggett Date: Thu, 15 Sep 2022 11:59:04 -0700 Subject: [PATCH] Better scrolling behavior. The log is now aware if you are not at the bottom and will not force scroll if so. Otherwise, it will bring the horizontal scroll back to the left-edge. --- loggingwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/loggingwindow.cpp b/loggingwindow.cpp index 09248a3..ade0661 100644 --- a/loggingwindow.cpp +++ b/loggingwindow.cpp @@ -57,7 +57,10 @@ void loggingWindow::acceptLogText(QString text) { QMutexLocker lock(&textMutex); ui->logTextDisplay->appendPlainText(text); - horizLogScroll->setValue(horizLogScroll->minimum()); + if(vertLogScroll->value() == vertLogScroll->maximum()) + { + horizLogScroll->setValue(horizLogScroll->minimum()); + } } void loggingWindow::sendToTermbin()