Commit 7ab735eb authored by obscuren's avatar obscuren

Max 250 log

parent ef1b923b
...@@ -319,7 +319,7 @@ ApplicationWindow { ...@@ -319,7 +319,7 @@ ApplicationWindow {
Slider { Slider {
id: logLevelSlider id: logLevelSlider
value: 2 value: 1
anchors { anchors {
right: parent.right right: parent.right
top: parent.top top: parent.top
...@@ -685,6 +685,11 @@ ApplicationWindow { ...@@ -685,6 +685,11 @@ ApplicationWindow {
} }
function addLog(str) { function addLog(str) {
// Remove first item once we've reached max log items
if(logModel.count > 250) {
logModel.remove(0)
}
if(str.len != 0) { if(str.len != 0) {
if(logView.flickableItem.atYEnd) { if(logView.flickableItem.atYEnd) {
logModel.append({description: str}) logModel.append({description: str})
...@@ -693,6 +698,7 @@ ApplicationWindow { ...@@ -693,6 +698,7 @@ ApplicationWindow {
logModel.append({description: str}) logModel.append({description: str})
} }
} }
} }
function setPeers(text) { function setPeers(text) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment