summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authordeva <deva>2011-04-04 11:40:47 +0000
committerdeva <deva>2011-04-04 11:40:47 +0000
commitfbdb0c502893716a65073c68d67b99d62620c32f (patch)
tree234fd409b8c2e51cf159be357aa3e0485bb2b363 /client
parentcf565c08aae0b5f4047cc6fe1c89d573a555c0a5 (diff)
Final fix for journal scrolling behaviour (finally scrolls correctly to bottom on init)
Diffstat (limited to 'client')
-rw-r--r--client/viewer.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/client/viewer.cc b/client/viewer.cc
index 4a194b4..170210c 100644
--- a/client/viewer.cc
+++ b/client/viewer.cc
@@ -118,6 +118,7 @@ Viewer::Viewer(QString cpr, QString templs, QString host, quint16 port,
l->addWidget(journal);
init();
+ show();
update();
}
@@ -220,8 +221,8 @@ void Viewer::update()
int max = journal->verticalScrollBar()->maximum();
int pos = journal->verticalScrollBar()->value();
journal->setPlainText(jstrip);
- // Scroll to bottom if we were there already or on first update.
- if(pos == max || jlast == "") pos = journal->verticalScrollBar()->maximum();
+ // Scroll to bottom if we were there already
+ if(pos == max) pos = journal->verticalScrollBar()->maximum();
journal->verticalScrollBar()->setValue(pos);
jlast = jstrip;
}