Commit 83c9ed80 authored by sumpfralle's avatar sumpfralle

update support grid after boundary change


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@345 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 73d8f857
...@@ -210,7 +210,7 @@ class ProjectGui: ...@@ -210,7 +210,7 @@ class ProjectGui:
for limit in ["minx", "miny", "minz", "maxx", "maxy", "maxz"]: for limit in ["minx", "miny", "minz", "maxx", "maxy", "maxz"]:
obj = self.gui.get_object(limit) obj = self.gui.get_object(limit)
self.settings.add_item(limit, obj.get_value, obj.set_value) self.settings.add_item(limit, obj.get_value, obj.set_value)
obj.connect("value-changed", self.update_view) obj.connect("value-changed", self.update_boundary_limits)
# connect the "Bounds" action # connect the "Bounds" action
self.gui.get_object("Minimize bounds").connect("clicked", self.minimize_bounds) self.gui.get_object("Minimize bounds").connect("clicked", self.minimize_bounds)
self.gui.get_object("Reset bounds").connect("clicked", self.reset_bounds) self.gui.get_object("Reset bounds").connect("clicked", self.reset_bounds)
...@@ -456,6 +456,15 @@ class ProjectGui: ...@@ -456,6 +456,15 @@ class ProjectGui:
def update_support_grid_controls(self, widget=None): def update_support_grid_controls(self, widget=None):
is_enabled = self.gui.get_object("SupportGridEnable").get_active() is_enabled = self.gui.get_object("SupportGridEnable").get_active()
details_box = self.gui.get_object("SupportGridDetailsBox") details_box = self.gui.get_object("SupportGridDetailsBox")
if is_enabled:
details_box.show()
else:
details_box.hide()
self.update_support_grid_model()
self.update_view()
def update_support_grid_model(self):
is_enabled = self.gui.get_object("SupportGridEnable").get_active()
s = self.settings s = self.settings
if is_enabled \ if is_enabled \
and (s.get("support_grid_thickness") > 0) \ and (s.get("support_grid_thickness") > 0) \
...@@ -468,10 +477,10 @@ class ProjectGui: ...@@ -468,10 +477,10 @@ class ProjectGui:
s.get("support_grid_thickness"))) s.get("support_grid_thickness")))
else: else:
self.settings.set("support_grid", None) self.settings.set("support_grid", None)
if is_enabled:
details_box.show() def update_boundary_limits(self, widget=None):
else: # the support grid depends on the boundary
details_box.hide() self.update_support_grid_model()
self.update_view() self.update_view()
def update_tasklist_controls(self, widget=None, data=None): def update_tasklist_controls(self, widget=None, data=None):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment