Skip to content

Commit

Permalink
Maximum recursion depth exceeded in comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
execuc committed Nov 29, 2019
1 parent c304813 commit 8d067f8
Show file tree
Hide file tree
Showing 7 changed files with 235 additions and 227 deletions.
12 changes: 6 additions & 6 deletions MakeBoxPanel.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ def __init__(self, obj):
obj.addProperty("App::PropertyPythonObject", "box_properties").box_properties = BoxProperties() # supported https://www.freecadweb.org/wiki/Scripted_objects
obj.addProperty("App::PropertyPythonObject", "top_properties").top_properties = TopBottomProperties()
obj.addProperty("App::PropertyPythonObject", "bottom_properties").bottom_properties = TopBottomProperties()
obj.addProperty('App::PropertyPythonObject', 'recompute').recompute = False
obj.addProperty('App::PropertyPythonObject', 'need_recompute').need_recompute = False
obj.addProperty('App::PropertyLinkList', 'parts').parts = []
obj.Proxy = self

def onChanged(self, fp, prop):
if prop == "recompute":
if prop == "need_recompute":
self.execute(fp)

def execute(self, fp):
if fp.recompute:
fp.recompute = False
if fp.need_recompute:
fp.need_recompute = False

document = fp.Document
computed_parts = makebox.make_box(fp.box_properties, fp.top_properties, fp.bottom_properties)
Expand Down Expand Up @@ -161,15 +161,15 @@ def reject(self):
self.obj_box.box_properties = self.box_properties_origin
self.obj_box.bottom_properties = self.bottom_properties_origin
self.obj_box.top_properties = self.top_properties_origin
self.obj_box.recompute = True
self.obj_box.need_recompute = True
return True

def preview(self):
self.general_box_param.get_properties()
self.dim_box_param.get_properties()
self.top_box_param.get_properties()
self.bottom_box_param.get_properties()
self.obj_box.recompute = True
self.obj_box.need_recompute = True


class MakeBoxCommand:
Expand Down
Loading

0 comments on commit 8d067f8

Please sign in to comment.