From a7fc3258a74ef09ef2f56d75768bcdeb3850bf96 Mon Sep 17 00:00:00 2001 From: Thomas Karl Pietrowski Date: Wed, 15 Jun 2016 11:16:13 +0200 Subject: [PATCH] Only use Application.[...].getGlobalContainerStack() to get all values --- plugins/USBPrinting/USBPrinterOutputDeviceManager.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py index 7c5d63c381..aa6a731c22 100644 --- a/plugins/USBPrinting/USBPrinterOutputDeviceManager.py +++ b/plugins/USBPrinting/USBPrinterOutputDeviceManager.py @@ -13,7 +13,6 @@ from UM.Qt.ListModel import ListModel from UM.Message import Message from cura.CuraApplication import CuraApplication -from cura.MachineManagerModel import MachineManagerModel import threading import platform @@ -130,13 +129,11 @@ class USBPrinterOutputDeviceManager(QObject, SignalEmitter, OutputDevicePlugin, def _getDefaultFirmwareName(self): # Detecting id of the current machine - machine_manager_model = MachineManagerModel() - machine_id = machine_manager_model.activeDefinitionId + machine_id = Application.getInstance().getGlobalContainerStack().getBottom().id # Detecting whether it has a heated bed - _active_container_stack = Application.getInstance().getGlobalContainerStack() - machine_has_heated_bed = _active_container_stack.getProperty("machine_heated_bed", "value") - + machine_has_heated_bed = Application.getInstance().getGlobalContainerStack().getProperty("machine_heated_bed", "value") + if platform.system() == "Linux": baudrate = 115200 else: