mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 13:49:00 +08: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
@ -86,7 +86,11 @@ class CuraEngineBackend(Backend):
|
||||
# This is usefull for debugging and used to actually start the engine
|
||||
# \return list of commands and args / parameters.
|
||||
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.
|
||||
# \param time The amount of time the print will take.
|
||||
|
Loading…
x
Reference in New Issue
Block a user