Commit f4fe31df authored by sumpfralle's avatar sumpfralle

fixed zoom code: don't break if no item is visible


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@1215 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 2cea7a80
......@@ -721,6 +721,10 @@ class OpenGLWindow(pycam.Plugins.PluginBase):
low, high = [None, None, None], [None, None, None]
self.core.call_chain("get_draw_dimension", low, high)
for index in range(3):
if high[index] is None:
high[index] = 10
if low[index] is None:
low[index] = 0
obj_dim.append(high[index] - low[index])
max_dim = max(obj_dim)
self.camera.move_camera_by_screen(x - start_x, y - start_y,
......
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