mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
If we have no active machine, return None in getEngineCommand
This fixes a race condition on Windows where setting the active machine takes too long
This commit is contained in:
parent
a435004459
commit
c5ca763621
1 changed files with 5 additions and 1 deletions
|
@ -86,7 +86,11 @@ class CuraEngineBackend(Backend):
|
||||||
# This is usefull for debugging and used to actually start the engine
|
# This is usefull for debugging and used to actually start the engine
|
||||||
# \return list of commands and args / parameters.
|
# \return list of commands and args / parameters.
|
||||||
def getEngineCommand(self):
|
def getEngineCommand(self):
|
||||||
return [Preferences.getInstance().getValue("backend/location"), "connect", "127.0.0.1:{0}".format(self._port), "-j", Application.getInstance().getMachineManager().getActiveMachineInstance().getMachineDefinition().getPath(), "-vv"]
|
active_machine = Application.getInstance().getMachineManager().getActiveMachineInstance()
|
||||||
|
if not active_machine:
|
||||||
|
return None
|
||||||
|
|
||||||
|
return [Preferences.getInstance().getValue("backend/location"), "connect", "127.0.0.1:{0}".format(self._port), "-j", active_machine.getMachineDefinition().getPath(), "-vv"]
|
||||||
|
|
||||||
## Emitted when we get a message containing print duration and material amount. This also implies the slicing has finished.
|
## Emitted when we get a message containing print duration and material amount. This also implies the slicing has finished.
|
||||||
# \param time The amount of time the print will take.
|
# \param time The amount of time the print will take.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue