diff options
author | Jacques Lucke <mail@jlucke.com> | 2019-05-27 18:15:10 +0300 |
---|---|---|
committer | Jacques Lucke <mail@jlucke.com> | 2019-05-27 18:15:29 +0300 |
commit | e4726462823d7e5554239a60f744a6e3f4b6cdde (patch) | |
tree | 0138b6bfa5f09ca911f78529de96a2133ce62f51 /source/blender/editors | |
parent | 7353e0563ee2aa0c6393112139ea38debdd18b54 (diff) |
Fix T65080: handle case when View2D has 0 scale
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/interface/view2d_draw.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/editors/interface/view2d_draw.c b/source/blender/editors/interface/view2d_draw.c index 2009bbecebc..43b49825219 100644 --- a/source/blender/editors/interface/view2d_draw.c +++ b/source/blender/editors/interface/view2d_draw.c @@ -267,6 +267,10 @@ static void draw_horizontal_scale_indicators(const ARegion *ar, void *to_string_data, int colorid) { + if (UI_view2d_scale_get_x(v2d) <= 0.0f) { + return; + } + GPU_matrix_push_projection(); wmOrtho2_region_pixelspace(ar); @@ -318,6 +322,10 @@ static void draw_vertical_scale_indicators(const ARegion *ar, void *to_string_data, int colorid) { + if (UI_view2d_scale_get_y(v2d) <= 0.0f) { + return; + } + GPU_matrix_push_projection(); wmOrtho2_region_pixelspace(ar); |