mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-28 08:26:32 +02:00
[ui] NodeLog: load file only if visible
* when visibility changes, only load current file if log is actually visible * set 'keepCursorPosition' default value to false in 'loadCurrentFile' method
This commit is contained in:
parent
143b519dbd
commit
3b656d97fd
1 changed files with 5 additions and 2 deletions
|
@ -87,8 +87,9 @@ FocusScope {
|
|||
property string currentFile: chunksLV.currentChunk ? chunksLV.currentChunk[currentItem.fileProperty] : ""
|
||||
property string lastLoadedFile
|
||||
property date lastModTime
|
||||
onCurrentFileChanged: if(visible) loadCurrentFile(false)
|
||||
onVisibleChanged: loadCurrentFile()
|
||||
onCurrentFileChanged: if(visible) loadCurrentFile()
|
||||
onVisibleChanged: if(visible) loadCurrentFile()
|
||||
|
||||
|
||||
TabButton {
|
||||
property string fileProperty: "logFile"
|
||||
|
@ -197,6 +198,8 @@ FocusScope {
|
|||
|
||||
function loadCurrentFile(keepCursorPosition)
|
||||
{
|
||||
if(keepCursorPosition == undefined)
|
||||
keepCursorPosition = false
|
||||
var xhr = new XMLHttpRequest;
|
||||
xhr.open("GET", Filepath.stringToUrl(fileSelector.currentFile));
|
||||
xhr.onreadystatechange = function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue