SolidView now uses activeContainerStack

CURA-1278
This commit is contained in:
Jaime van Kessel 2016-05-09 15:42:47 +02:00
parent 1b9c29579b
commit 0049ee1377

View file

@ -34,12 +34,11 @@ class SolidView(View):
self._disabled_shader.setUniformValue("u_diffuseColor", [0.68, 0.68, 0.68, 1.0])
self._disabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0)))
if Application.getInstance().getMachineManager().getWorkingProfile():
profile = Application.getInstance().getMachineManager().getWorkingProfile()
if Application.getInstance().getActiveContainerStack():
if Preferences.getInstance().getValue("view/show_overhang"):
angle = profile.getSettingValue("support_angle")
if angle != None:
angle = Application.getInstance().getActiveContainerStack().getValue("support_angle")
if angle is not None:
self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(90 - angle)))
else:
self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0))) #Overhang angle of 0 causes no area at all to be marked as overhang.