mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Merge pull request #19755 from Ultimaker/CURA-11815_fix_early_autoslice
[CURA-11815] Fix 'early' auto-slice.
This commit is contained in:
commit
1e60a15091
1 changed files with 12 additions and 0 deletions
|
@ -68,6 +68,9 @@ class CuraEngineBackend(QObject, Backend):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
self._init_done = False
|
||||||
|
self._immediate_slice_after_init = False
|
||||||
|
|
||||||
# Find out where the engine is located, and how it is called.
|
# Find out where the engine is located, and how it is called.
|
||||||
# This depends on how Cura is packaged and which OS we are running on.
|
# This depends on how Cura is packaged and which OS we are running on.
|
||||||
executable_name = "CuraEngine"
|
executable_name = "CuraEngine"
|
||||||
|
@ -268,6 +271,10 @@ class CuraEngineBackend(QObject, Backend):
|
||||||
self._machine_error_checker = application.getMachineErrorChecker()
|
self._machine_error_checker = application.getMachineErrorChecker()
|
||||||
self._machine_error_checker.errorCheckFinished.connect(self._onStackErrorCheckFinished)
|
self._machine_error_checker.errorCheckFinished.connect(self._onStackErrorCheckFinished)
|
||||||
|
|
||||||
|
self._init_done = True
|
||||||
|
if self._immediate_slice_after_init:
|
||||||
|
self.slice()
|
||||||
|
|
||||||
def close(self) -> None:
|
def close(self) -> None:
|
||||||
"""Terminate the engine process.
|
"""Terminate the engine process.
|
||||||
|
|
||||||
|
@ -342,6 +349,11 @@ class CuraEngineBackend(QObject, Backend):
|
||||||
def slice(self) -> None:
|
def slice(self) -> None:
|
||||||
"""Perform a slice of the scene."""
|
"""Perform a slice of the scene."""
|
||||||
|
|
||||||
|
if not self._init_done:
|
||||||
|
self._immediate_slice_after_init = True
|
||||||
|
return
|
||||||
|
self._immediate_slice_after_init = False
|
||||||
|
|
||||||
self._createSnapshot()
|
self._createSnapshot()
|
||||||
|
|
||||||
self.startPlugins()
|
self.startPlugins()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue