mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 21:12:48 +01:00
Merge pull request #1301 from laanwj/2012_05_rpcscrolltoend
RPC console: scroll to the end when user enters a command
This commit is contained in:
commit
7dc04f4091
@ -11,6 +11,7 @@
|
|||||||
#include <QTextEdit>
|
#include <QTextEdit>
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
#include <QScrollBar>
|
||||||
|
|
||||||
#include <boost/tokenizer.hpp>
|
#include <boost/tokenizer.hpp>
|
||||||
|
|
||||||
@ -262,6 +263,8 @@ void RPCConsole::on_lineEdit_returnPressed()
|
|||||||
history.removeFirst();
|
history.removeFirst();
|
||||||
// Set pointer to end of history
|
// Set pointer to end of history
|
||||||
historyPtr = history.size();
|
historyPtr = history.size();
|
||||||
|
// Scroll console view to end
|
||||||
|
scrollToEnd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,3 +318,9 @@ void RPCConsole::on_openDebugLogfileButton_clicked()
|
|||||||
{
|
{
|
||||||
GUIUtil::openDebugLogfile();
|
GUIUtil::openDebugLogfile();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RPCConsole::scrollToEnd()
|
||||||
|
{
|
||||||
|
QScrollBar *scrollbar = ui->messagesWidget->verticalScrollBar();
|
||||||
|
scrollbar->setValue(scrollbar->maximum());
|
||||||
|
}
|
||||||
|
@ -44,7 +44,8 @@ public slots:
|
|||||||
void setNumBlocks(int count);
|
void setNumBlocks(int count);
|
||||||
/** Go forward or back in history */
|
/** Go forward or back in history */
|
||||||
void browseHistory(int offset);
|
void browseHistory(int offset);
|
||||||
|
/** Scroll console view to end */
|
||||||
|
void scrollToEnd();
|
||||||
signals:
|
signals:
|
||||||
// For RPC command executor
|
// For RPC command executor
|
||||||
void stopExecutor();
|
void stopExecutor();
|
||||||
|
Loading…
Reference in New Issue
Block a user