Fix infinite recursion with angle/percentage roof properties in 2597827

Probably was harmless, it was just flooding the console with errors such as:

object address  : 000002485A776380
object refcount : 2
object type     : 00007FFBD1249050
object type name: RecursionError
object repr     :
lost sys.stderr
File "\bonsai\bim\module\model\prop.py", line 707, in <lambda>
object address  : 000002485A774520
object refcount : 2
object type     : 00007FFBD1249050
object type name: RecursionError
object repr     :
lost sys.stderr
File "\bonsai\bim\module\model\prop.py", line 713, in <lambda>
This commit is contained in:
Andrej730
2024-10-23 11:57:04 +05:00
parent a1134e83a4
commit d68dee148b
+4 -4
View File
@@ -739,11 +739,11 @@ class BIMRoofProperties(PropertyGroup):
for prop_name in kwargs:
setattr(self, prop_name, kwargs[prop_name])
def update_angle(self):
self.angle = math.atan(self.percentage / 100)
def update_angle(self) -> None:
self["angle"] = math.atan(self.percentage / 100)
def update_percentage(self):
self.percentage = math.tan(self.angle) * 100
def update_percentage(self) -> None:
self["percentage"] = math.tan(self.angle) * 100
class SnapMousePoint(PropertyGroup):