Fix T65080: handle case when View2D has 0 scale
This commit is contained in:
parent
7353e0563e
commit
e472646282
Notes:
blender-bot
2023-02-14 02:27:48 +01:00
Referenced by issue #65080, Assert on editor split while dragging to resize
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue