From 563bd1ddb55dfc9dd86bae180eeafc102359aad6 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 12 Feb 2016 11:11:18 +0100 Subject: [PATCH] Fix setting for show overhang For some reason the setting was inverted. Also, someone forgot to take the case into account where the setting exists but is None (which is the case when the setting is False). Fixes issue CURA-308. --- plugins/SolidView/SolidView.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/SolidView/SolidView.py b/plugins/SolidView/SolidView.py index beb2780d14..d9895e1d06 100644 --- a/plugins/SolidView/SolidView.py +++ b/plugins/SolidView/SolidView.py @@ -37,10 +37,12 @@ class SolidView(View): if Application.getInstance().getMachineManager().getWorkingProfile(): profile = Application.getInstance().getMachineManager().getWorkingProfile() - if profile.getSettingValue("support_enable") or not Preferences.getInstance().getValue("view/show_overhang"): + if Preferences.getInstance().getValue("view/show_overhang"): angle = profile.getSettingValue("support_angle") if angle != 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. else: self._enabled_shader.setUniformValue("u_overhangAngle", math.cos(math.radians(0)))