mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-04 01:08:26 +02:00
[ui] thumbnail request: stop timer after 1st trigger to avoid running endlessly in background
This commit is contained in:
parent
334bfc8b00
commit
b4851d7a50
1 changed files with 1 additions and 5 deletions
|
@ -41,19 +41,15 @@ Item {
|
|||
updateThumbnail();
|
||||
}
|
||||
|
||||
// Send a new request every 5 seconds until thumbnail is loaded
|
||||
// Send a new request after 5 seconds if thumbnail is not loaded
|
||||
// This is meant to avoid deadlocks in case there is a synchronization problem
|
||||
Timer {
|
||||
interval: 5000
|
||||
repeat: true
|
||||
running: true
|
||||
onTriggered: {
|
||||
if (thumbnail.status == Image.Null) {
|
||||
updateThumbnail();
|
||||
}
|
||||
else {
|
||||
running = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue