Commit 9149bb23 authored by sumpfralle's avatar sumpfralle

simplified dimension code


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@187 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent fe19dd14
...@@ -291,9 +291,11 @@ class GLView: ...@@ -291,9 +291,11 @@ class GLView:
s = self.settings s = self.settings
dimension_bar = self.gui.get_object("view3ddimension") dimension_bar = self.gui.get_object("view3ddimension")
if s.get("show_dimensions"): if s.get("show_dimensions"):
self.gui.get_object("model_dim_x").set_text("%.3f %s" % (s.get("maxx") - s.get("minx"), s.get("unit"))) for name, size in (
self.gui.get_object("model_dim_y").set_text("%.3f %s" % (s.get("maxy") - s.get("miny"), s.get("unit"))) ("model_dim_x", s.get("maxx") - s.get("minx")),
self.gui.get_object("model_dim_z").set_text("%.3f %s" % (s.get("maxz") - s.get("minz"), s.get("unit"))) ("model_dim_y", s.get("maxy") - s.get("miny")),
("model_dim_z", s.get("maxz") - s.get("minz"))):
self.gui.get_object(name).set_text("%.3f %s" % (size, s.get("unit")))
dimension_bar.show() dimension_bar.show()
else: else:
dimension_bar.hide() dimension_bar.hide()
......
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