diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-12-19 03:56:05 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-12-19 03:56:05 +0300 |
commit | 6a1ce20043860e4f836294d46a86b5fcf7fbf1a8 (patch) | |
tree | d99f11f29954067c147cde7b99e97ddb19ef5e00 /measureit | |
parent | 156c5ea6a45d0549d8422e3ea295972dec7766c3 (diff) | |
parent | 9cc2ad1eaf941d8ed3b5542a3d5cdfccec7ba60b (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'measureit')
-rw-r--r-- | measureit/measureit_geometry.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/measureit/measureit_geometry.py b/measureit/measureit_geometry.py index 191f981b..6340a890 100644 --- a/measureit/measureit_geometry.py +++ b/measureit/measureit_geometry.py @@ -835,9 +835,9 @@ def draw_text(myobj, pos2d, display_text, rgba, fsize, align='L', text_rot=0.0): # ------------------- for line in mylines: text_width, text_height = blf.dimensions(font_id, line) - if align is 'C': + if align == 'C': newx = x_pos - text_width / 2 - elif align is 'R': + elif align == 'R': newx = x_pos - text_width - gap else: newx = x_pos @@ -855,7 +855,7 @@ def draw_text(myobj, pos2d, display_text, rgba, fsize, align='L', text_rot=0.0): if maxwidth < text_width: maxwidth = text_width - if align is 'L': + if align == 'L': blf.disable(font_id, ROTATION) return maxwidth, maxheight |