Commit 91fb9e4c authored by sumpfralle's avatar sumpfralle

fixed potential DivisionByZero


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@1006 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent ba3b1155
......@@ -2034,7 +2034,8 @@ class ProjectGui:
drawing_area.draw_rectangle(preview_widget.get_style().white_gc, True,
0, 0, width, height)
# carefully check if there are lines in the rendered text
if text_model and (not text_model.maxx is None):
if text_model and (not text_model.maxx is None) and \
(text_model.maxx > text_model.minx):
# leave a small border around the preview
border = 3
x_fac = (width - 1 - 2 * border) / \
......
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