Commit 3000edd8 authored by Snehal M Shekatkar's avatar Snehal M Shekatkar

Fix pen_width bug in cairo_draw

When user passes pen_width value only for either vertex or edge, an
error is thrown since inside min_lw, lw may be None. This bug fixes
that by assigning value lw=0.1 whenever it is 0.1
parent d9f9b513
Pipeline #739 failed with stage
in 0 seconds
......@@ -1339,6 +1339,8 @@ def fit_to_view_ink(g, pos, output_size, vprops, eprops, adjust_aspect=False,
x[x < 0.05] = 0.1
lw.fa = x
else:
if lw == None:
lw = 0.1
lw = max(lw, 0.1)
return lw
vprops = dict(vprops, pen_width=min_lw(vprops.get("pen_width")))
......
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