mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Only use Application.[...].getGlobalContainerStack() to get all values
This commit is contained in:
parent
5128ea41c4
commit
a7fc3258a7
1 changed files with 3 additions and 6 deletions
|
@ -13,7 +13,6 @@ from UM.Qt.ListModel import ListModel
|
||||||
from UM.Message import Message
|
from UM.Message import Message
|
||||||
|
|
||||||
from cura.CuraApplication import CuraApplication
|
from cura.CuraApplication import CuraApplication
|
||||||
from cura.MachineManagerModel import MachineManagerModel
|
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
import platform
|
import platform
|
||||||
|
@ -130,13 +129,11 @@ class USBPrinterOutputDeviceManager(QObject, SignalEmitter, OutputDevicePlugin,
|
||||||
|
|
||||||
def _getDefaultFirmwareName(self):
|
def _getDefaultFirmwareName(self):
|
||||||
# Detecting id of the current machine
|
# Detecting id of the current machine
|
||||||
machine_manager_model = MachineManagerModel()
|
machine_id = Application.getInstance().getGlobalContainerStack().getBottom().id
|
||||||
machine_id = machine_manager_model.activeDefinitionId
|
|
||||||
|
|
||||||
# Detecting whether it has a heated bed
|
# Detecting whether it has a heated bed
|
||||||
_active_container_stack = Application.getInstance().getGlobalContainerStack()
|
machine_has_heated_bed = Application.getInstance().getGlobalContainerStack().getProperty("machine_heated_bed", "value")
|
||||||
machine_has_heated_bed = _active_container_stack.getProperty("machine_heated_bed", "value")
|
|
||||||
|
|
||||||
if platform.system() == "Linux":
|
if platform.system() == "Linux":
|
||||||
baudrate = 115200
|
baudrate = 115200
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue