aboutsummaryrefslogtreecommitdiff
path: root/courtroom.cpp
diff options
context:
space:
mode:
authorghostfeesh <codeviscerate@gmail.com>2018-07-28 09:01:25 +0800
committerGitHub <noreply@github.com>2018-07-28 09:01:25 +0800
commit22fd5f2804e919b7d4ff0f99ccd5656cabc9c02f (patch)
tree3e49c303fb2c375708c22b21426defffc807090f /courtroom.cpp
parent3129d2aded8a323dce9a184e3da99daac8bea35a (diff)
Bump to 2.4.10, autoscrolling bug fixes
Diffstat (limited to 'courtroom.cpp')
-rw-r--r--courtroom.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/courtroom.cpp b/courtroom.cpp
index 76d6b03f..eb6a786c 100644
--- a/courtroom.cpp
+++ b/courtroom.cpp
@@ -1174,8 +1174,14 @@ void Courtroom::append_ic_text(QString p_text, QString p_name)
else
{
// The user hasn't selected any text and the scrollbar is at the top: scroll to the top.
- ui_ic_chatlog->moveCursor(move_op);
- ui_ic_chatlog->verticalScrollBar()->setValue(scrollbar_limit);
+ if(ao_app->ic_scroll_down_enabled()) {
+ ui_ic_chatlog->moveCursor(QTextCursor::End);
+ ui_ic_chatlog->verticalScrollBar()->setValue(ui_ic_chatlog->verticalScrollBar()->maximum());
+ }
+ else {
+ ui_ic_chatlog->moveCursor(QTextCursor::Start);
+ ui_ic_chatlog->verticalScrollBar()->setValue(ui_ic_chatlog->verticalScrollBar()->minimum());
+ }
}
}