mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 17:57:55 -06:00
Fix call_on_qt_thread decorator
CURA-6225 Do thread check in the wrapper function, not outside.
This commit is contained in:
parent
ace638ec81
commit
f521fae152
2 changed files with 13 additions and 2 deletions
|
@ -44,8 +44,12 @@ class UFPWriter(MeshWriter):
|
|||
# trigger loading other containers. Because those loaded containers are QtObjects, they must be created on the
|
||||
# Qt thread. The File read/write operations right now are executed on separated threads because they are scheduled
|
||||
# by the Job class.
|
||||
@call_on_qt_thread
|
||||
def write(self, stream, nodes, mode = MeshWriter.OutputMode.BinaryMode):
|
||||
print("------------> self _write = ", self._write)
|
||||
return self._write(stream, nodes, mode = mode)
|
||||
|
||||
@call_on_qt_thread
|
||||
def _write(self, stream, nodes, mode = MeshWriter.OutputMode.BinaryMode):
|
||||
archive = VirtualFile()
|
||||
archive.openStream(stream, "application/x-ufp", OpenMode.WriteOnly)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue