Use working profile instead of "active" profile

This commit is contained in:
fieldOfView 2016-01-28 12:23:24 +01:00
parent 828752af30
commit 6e11c2409b
12 changed files with 17 additions and 17 deletions

View file

@ -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()

View file

@ -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)

View file

@ -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

View file

@ -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):

View file

@ -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)

View file

@ -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()