mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 19:39:03 +08:00
updated cura application to new API
This commit is contained in:
parent
b16933d68f
commit
63ddfccd52
@ -398,18 +398,18 @@ class CuraApplication(QtApplication):
|
||||
|
||||
@pyqtSlot(str, result = "QVariant")
|
||||
def getSettingValue(self, key):
|
||||
if not self.getMachineManager().getActiveMachineInstance():
|
||||
if not self.getMachineManager().getActiveProfile():
|
||||
return None
|
||||
|
||||
return self.getActiveMachine().getSettingValueByKey(key)
|
||||
return self.getMachineManager().getActiveProfile().getSettingValueByKey(key)
|
||||
#return self.getActiveMachine().getSettingValueByKey(key)
|
||||
|
||||
## Change setting by key value pair
|
||||
@pyqtSlot(str, "QVariant")
|
||||
def setSettingValue(self, key, value):
|
||||
if not self.getActiveMachine():
|
||||
if not self.getMachineManager().getActiveProfile():
|
||||
return
|
||||
|
||||
self.getActiveMachine().setSettingValueByKey(key, value)
|
||||
self.getMachineManager().getActiveProfile().getSettingValueByKey(key, value)
|
||||
|
||||
@pyqtSlot()
|
||||
def mergeSelected(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user