[ui] logs: add button to control auto-refresh when chunk is running

This commit is contained in:
Yann Lanthony 2018-01-25 21:47:33 +01:00
parent 796551dc38
commit 817e286d8f

View file

@ -124,6 +124,15 @@ FocusScope {
font.family: MaterialIcons.fontFamily
onClicked: loadCurrentFile(false)
}
ToolButton {
id: autoRefresh
text: MaterialIcons.timer
ToolTip.text: "Auto-Refresh when Running"
ToolTip.visible: hovered
font.family: MaterialIcons.fontFamily
checked: true
checkable: true
}
ToolButton {
text: MaterialIcons.vertical_align_top
ToolTip.text: "Scroll to Top"
@ -175,7 +184,7 @@ FocusScope {
// Auto-reload current file if NodeChunk is being computed
Timer {
running: chunksLV.currentChunk != undefined && chunksLV.currentChunk.statusName === "RUNNING"
running: autoRefresh.checked && chunksLV.currentChunk != undefined && chunksLV.currentChunk.statusName === "RUNNING"
interval: 2000
repeat: true
triggeredOnStart: true