Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions meshroom/core/taskManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import traceback
import logging
from threading import Thread
from PySide6.QtCore import Qt, QThread, QEventLoop, QTimer
from PySide6.QtCore import Qt, QMetaObject, QThread, QEventLoop, QTimer
from enum import Enum
from meshroom.common import strtobool

Expand Down Expand Up @@ -139,7 +139,9 @@ def run(self):
except ValueError:
# Node already removed (for instance a global clear of _nodesToProcess)
pass
n.clearSubmittedChunks()
# clearSubmittedChunks may create NodeChunk QObjects; those must be
# created on the main thread so QML can safely connect to them.
QMetaObject.invokeMethod(n, "clearSubmittedChunks", Qt.QueuedConnection)
node.postprocess()

if stopAndRestart:
Expand Down
3 changes: 2 additions & 1 deletion meshroom/ui/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from collections import OrderedDict

from PySide6.QtCore import (
Qt,
Slot,
QJsonValue,
QObject,
Expand Down Expand Up @@ -150,7 +151,7 @@ def __init__(self, parent=None):
self.monitorableNodes = []
self.monitoredFiles = {} # Dict {filepath: node}
self._filesTimePoller = FilesModTimePollerThread(parent=self)
self._filesTimePoller.timesAvailable.connect(self.compareFilesTimes)
self._filesTimePoller.timesAvailable.connect(self.compareFilesTimes, Qt.QueuedConnection)
self._filesTimePoller.start()
self.setMonitored([])
self.filePollerRefreshChanged.connect(self._filesTimePoller.onFilePollerRefreshChanged)
Expand Down
Loading