mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-04 09:18:27 +02:00
Merge pull request #548 from alicevision/fix/nodeLog
Status and Log minor fixes
This commit is contained in:
commit
34d0b7ff20
2 changed files with 15 additions and 5 deletions
|
@ -306,8 +306,12 @@ class UIGraph(QObject):
|
|||
if self._sortedDFSChunks.objectList() == chunks:
|
||||
return
|
||||
self._sortedDFSChunks.setObjectList(chunks)
|
||||
# Update the list of monitored chunks
|
||||
self._chunksMonitor.setChunks(self._sortedDFSChunks)
|
||||
# provide ChunkMonitor with the update list of chunks
|
||||
self.updateChunkMonitor(self._sortedDFSChunks)
|
||||
|
||||
def updateChunkMonitor(self, chunks):
|
||||
""" Update the list of chunks for status files monitoring. """
|
||||
self._chunksMonitor.setChunks(chunks)
|
||||
|
||||
def clear(self):
|
||||
if self._graph:
|
||||
|
@ -342,6 +346,9 @@ class UIGraph(QObject):
|
|||
localFile += ".mg"
|
||||
self._graph.save(localFile)
|
||||
self._undoStack.setClean()
|
||||
# saving file on disk impacts cache folder location
|
||||
# => force re-evaluation of monitored status files paths
|
||||
self.updateChunkMonitor(self._sortedDFSChunks)
|
||||
|
||||
@Slot()
|
||||
def save(self):
|
||||
|
|
|
@ -22,6 +22,7 @@ Item {
|
|||
property bool loading: false
|
||||
|
||||
onSourceChanged: loadSource()
|
||||
onAutoReloadChanged: loadSource()
|
||||
onVisibleChanged: if(visible) loadSource()
|
||||
|
||||
RowLayout {
|
||||
|
@ -307,11 +308,10 @@ Item {
|
|||
|
||||
// Auto-reload current file timer
|
||||
Timer {
|
||||
id: reloadTimer
|
||||
running: root.autoReload
|
||||
interval: root.autoReloadInterval
|
||||
repeat: true
|
||||
// reload file on start and stop
|
||||
onRunningChanged: loadSource()
|
||||
repeat: false // timer is restarted in request's callback (see loadSource)
|
||||
onTriggered: loadSource()
|
||||
}
|
||||
|
||||
|
@ -333,6 +333,9 @@ Item {
|
|||
if(xhr.readyState === XMLHttpRequest.DONE) {
|
||||
textView.setText(xhr.status === 200 ? xhr.responseText : "");
|
||||
loading = false;
|
||||
// re-trigger reload source file
|
||||
if(autoReload)
|
||||
reloadTimer.restart();
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue