mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
D5: Refactoring
This commit is contained in:
parent
ce9251b5a6
commit
1631045d7a
10 changed files with 69 additions and 43 deletions
|
@ -10,6 +10,7 @@ from UM.Math.AxisAlignedBox import AxisAlignedBox
|
|||
from UM.Application import Application
|
||||
from UM.Message import Message
|
||||
from UM.Logger import Logger
|
||||
from UM.Backend.Backend import BackendState
|
||||
|
||||
from UM.i18n import i18nCatalog
|
||||
catalog = i18nCatalog("cura")
|
||||
|
@ -67,11 +68,11 @@ class GCodeReader(MeshReader):
|
|||
backend = Application.getInstance().getBackend()
|
||||
if self.scene_node is not None and self.scene_node.getParent() is None:
|
||||
self.scene_node = None
|
||||
backend._pauseSlicing = False
|
||||
backend.backendStateChange.emit(BackendState.NotStarted)
|
||||
Application.getInstance().setHideSettings(False)
|
||||
Application.getInstance().getPrintInformation().setPreSliced(False)
|
||||
else:
|
||||
backend._pauseSlicing = True
|
||||
backend.backendStateChange.emit(BackendState.SlicingDisabled)
|
||||
Application.getInstance().getPrintInformation().setPreSliced(True)
|
||||
Application.getInstance().setHideSettings(True)
|
||||
|
||||
|
@ -135,9 +136,8 @@ class GCodeReader(MeshReader):
|
|||
self.scene_node.parentChanged.connect(self.onParentChanged)
|
||||
|
||||
backend = Application.getInstance().getBackend()
|
||||
backend._pauseSlicing = True
|
||||
backend.close()
|
||||
backend.backendStateChange.emit(3)
|
||||
backend.backendStateChange.emit(BackendState.SlicingDisabled)
|
||||
|
||||
glist = getattr(Application.getInstance().getController().getScene(), "gcode_list")
|
||||
glist.clear()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue