mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-10-10 07:17:52 -06:00
Use working profile instead of "active" profile
This commit is contained in:
parent
828752af30
commit
6e11c2409b
12 changed files with 17 additions and 17 deletions
|
@ -146,7 +146,7 @@ class BuildVolume(SceneNode):
|
|||
|
||||
skirt_size = 0.0
|
||||
|
||||
profile = Application.getInstance().getMachineManager().getActiveProfile()
|
||||
profile = Application.getInstance().getMachineManager().getWorkingProfile()
|
||||
if profile:
|
||||
skirt_size = self._getSkirtSize(profile)
|
||||
|
||||
|
@ -176,7 +176,7 @@ class BuildVolume(SceneNode):
|
|||
if self._active_profile:
|
||||
self._active_profile.settingValueChanged.disconnect(self._onSettingValueChanged)
|
||||
|
||||
self._active_profile = Application.getInstance().getMachineManager().getActiveProfile()
|
||||
self._active_profile = Application.getInstance().getMachineManager().getWorkingProfile()
|
||||
if self._active_profile:
|
||||
self._active_profile.settingValueChanged.connect(self._onSettingValueChanged)
|
||||
self._updateDisallowedAreas()
|
||||
|
|
|
@ -63,7 +63,7 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
|||
if self._profile:
|
||||
self._profile.settingValueChanged.disconnect(self._onSettingValueChanged)
|
||||
|
||||
self._profile = Application.getInstance().getMachineManager().getActiveProfile()
|
||||
self._profile = Application.getInstance().getMachineManager().getWorkingProfile()
|
||||
|
||||
if self._profile:
|
||||
self._profile.settingValueChanged.connect(self._onSettingValueChanged)
|
||||
|
|
|
@ -49,7 +49,7 @@ class ConvexHullJob(Job):
|
|||
# This is done because of rounding errors.
|
||||
hull = hull.getMinkowskiHull(Polygon(numpy.array([[-1, -1], [-1, 1], [1, 1], [1, -1]], numpy.float32)))
|
||||
|
||||
profile = Application.getInstance().getMachineManager().getActiveProfile()
|
||||
profile = Application.getInstance().getMachineManager().getWorkingProfile()
|
||||
if profile:
|
||||
if profile.getSettingValue("print_sequence") == "one_at_a_time" and not self._node.getParent().callDecoration("isGroup"):
|
||||
# Printing one at a time and it's not an object in a group
|
||||
|
|
|
@ -502,18 +502,18 @@ class CuraApplication(QtApplication):
|
|||
|
||||
@pyqtSlot(str, result = "QVariant")
|
||||
def getSettingValue(self, key):
|
||||
if not self.getMachineManager().getActiveProfile():
|
||||
if not self.getMachineManager().getWorkingProfile():
|
||||
return None
|
||||
return self.getMachineManager().getActiveProfile().getSettingValue(key)
|
||||
return self.getMachineManager().getWorkingProfile().getSettingValue(key)
|
||||
#return self.getActiveMachine().getSettingValueByKey(key)
|
||||
|
||||
## Change setting by key value pair
|
||||
@pyqtSlot(str, "QVariant")
|
||||
def setSettingValue(self, key, value):
|
||||
if not self.getMachineManager().getActiveProfile():
|
||||
if not self.getMachineManager().getWorkingProfile():
|
||||
return
|
||||
|
||||
self.getMachineManager().getActiveProfile().setSettingValue(key, value)
|
||||
self.getMachineManager().getWorkingProfile().setSettingValue(key, value)
|
||||
|
||||
@pyqtSlot()
|
||||
def mergeSelected(self):
|
||||
|
|
|
@ -21,7 +21,7 @@ class OneAtATimeIterator(Iterator.Iterator):
|
|||
if not type(node) is SceneNode:
|
||||
continue
|
||||
|
||||
if node.getBoundingBox().height > Application.getInstance().getMachineManager().getActiveProfile().getSettingValue("gantry_height"):
|
||||
if node.getBoundingBox().height > Application.getInstance().getMachineManager().getWorkingProfile().getSettingValue("gantry_height"):
|
||||
return
|
||||
if node.callDecoration("getConvexHull"):
|
||||
node_list.append(node)
|
||||
|
|
|
@ -66,6 +66,6 @@ class PrintInformation(QObject):
|
|||
self.currentPrintTimeChanged.emit()
|
||||
|
||||
# Material amount is sent as an amount of mm^3, so calculate length from that
|
||||
r = Application.getInstance().getMachineManager().getActiveProfile().getSettingValue("material_diameter") / 2
|
||||
r = Application.getInstance().getMachineManager().getWorkingProfile().getSettingValue("material_diameter") / 2
|
||||
self._material_amount = round((amount / (math.pi * r ** 2)) / 1000, 2)
|
||||
self.materialAmountChanged.emit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue