mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 23:25:53 +08:00
Revert "CuraApplication/UM.MeshBuilder: Removing _reloadMeshFinished"
This reverts commit 269b52487ed28e42daf7e2716117c4d3d27bc2fa. It was crashing Cura when pressing F5. The completion of this job should not be moved to Uranium because the job exists only in Cura. Contributes to issue CURA-4912.
This commit is contained in:
parent
b54d709f96
commit
c47045a42e
@ -1307,7 +1307,7 @@ class CuraApplication(QtApplication):
|
|||||||
if file_name:
|
if file_name:
|
||||||
job = ReadMeshJob(file_name)
|
job = ReadMeshJob(file_name)
|
||||||
job._node = node
|
job._node = node
|
||||||
job.finished.connect(node._reloadJobFinished)
|
job.finished.connect(self._reloadMeshFinished)
|
||||||
job.start()
|
job.start()
|
||||||
else:
|
else:
|
||||||
Logger.log("w", "Unable to reload data because we don't have a filename.")
|
Logger.log("w", "Unable to reload data because we don't have a filename.")
|
||||||
@ -1436,6 +1436,14 @@ class CuraApplication(QtApplication):
|
|||||||
fileLoaded = pyqtSignal(str)
|
fileLoaded = pyqtSignal(str)
|
||||||
fileCompleted = pyqtSignal(str)
|
fileCompleted = pyqtSignal(str)
|
||||||
|
|
||||||
|
def _reloadMeshFinished(self, job):
|
||||||
|
# TODO; This needs to be fixed properly. We now make the assumption that we only load a single mesh!
|
||||||
|
mesh_data = job.getResult()[0].getMeshData()
|
||||||
|
if mesh_data:
|
||||||
|
job._node.setMeshData(mesh_data)
|
||||||
|
else:
|
||||||
|
Logger.log("w", "Could not find a mesh in reloaded node.")
|
||||||
|
|
||||||
def _openFile(self, filename):
|
def _openFile(self, filename):
|
||||||
self.readLocalFile(QUrl.fromLocalFile(filename))
|
self.readLocalFile(QUrl.fromLocalFile(filename))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user