mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
D6: Moved backend pausing to itself
This commit is contained in:
parent
b967f045fe
commit
cb428c70de
2 changed files with 23 additions and 17 deletions
|
@ -12,6 +12,8 @@ from UM.PluginRegistry import PluginRegistry
|
|||
from UM.Resources import Resources
|
||||
from UM.Settings.Validator import ValidatorState #To find if a setting is in an error state. We can't slice then.
|
||||
from UM.Platform import Platform
|
||||
from UM.Scene.Iterator.DepthFirstIterator import DepthFirstIterator
|
||||
|
||||
|
||||
import cura.Settings
|
||||
|
||||
|
@ -313,6 +315,26 @@ class CuraEngineBackend(Backend):
|
|||
if source is self._scene.getRoot():
|
||||
return
|
||||
|
||||
application = Application.getInstance()
|
||||
|
||||
should_pause = False
|
||||
for node in DepthFirstIterator(self._scene.getRoot()):
|
||||
if node.callDecoration("isBlockSlicing"):
|
||||
should_pause = True
|
||||
gcode_list = node.callDecoration("getGCodeList")
|
||||
if gcode_list is not None:
|
||||
self._scene.gcode_list = gcode_list
|
||||
|
||||
print_information = application.getPrintInformation()
|
||||
if should_pause:
|
||||
self.pauseSlicing()
|
||||
if print_information:
|
||||
print_information.setPreSliced(True)
|
||||
else:
|
||||
self.continueSlicing()
|
||||
if print_information:
|
||||
print_information.setPreSliced(False)
|
||||
|
||||
if source.getMeshData() is None:
|
||||
return
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue