mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 22:05:56 +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")
|
@pyqtSlot(str, result = "QVariant")
|
||||||
def getSettingValue(self, key):
|
def getSettingValue(self, key):
|
||||||
if not self.getMachineManager().getActiveMachineInstance():
|
if not self.getMachineManager().getActiveProfile():
|
||||||
return None
|
return None
|
||||||
|
return self.getMachineManager().getActiveProfile().getSettingValueByKey(key)
|
||||||
return self.getActiveMachine().getSettingValueByKey(key)
|
#return self.getActiveMachine().getSettingValueByKey(key)
|
||||||
|
|
||||||
## Change setting by key value pair
|
## Change setting by key value pair
|
||||||
@pyqtSlot(str, "QVariant")
|
@pyqtSlot(str, "QVariant")
|
||||||
def setSettingValue(self, key, value):
|
def setSettingValue(self, key, value):
|
||||||
if not self.getActiveMachine():
|
if not self.getMachineManager().getActiveProfile():
|
||||||
return
|
return
|
||||||
|
|
||||||
self.getActiveMachine().setSettingValueByKey(key, value)
|
self.getMachineManager().getActiveProfile().getSettingValueByKey(key, value)
|
||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def mergeSelected(self):
|
def mergeSelected(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user