diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-27 17:11:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-27 17:14:03 +0300 |
commit | 73b55a5508c6f3e9bb7b59d2d903ac584518eccc (patch) | |
tree | d7fdb2fd47bf743d3a7bc6a5edfccbd25b8175dd /source/blender/draw/modes | |
parent | 56b06ee83afba38099fb7affc260885a613a3779 (diff) |
Cleanup: style, use braces for draw
Diffstat (limited to 'source/blender/draw/modes')
-rw-r--r-- | source/blender/draw/modes/edit_mesh_mode_text.c | 10 | ||||
-rw-r--r-- | source/blender/draw/modes/edit_metaball_mode.c | 16 |
2 files changed, 17 insertions, 9 deletions
diff --git a/source/blender/draw/modes/edit_mesh_mode_text.c b/source/blender/draw/modes/edit_mesh_mode_text.c index bd2f65a40cd..629cb042562 100644 --- a/source/blender/draw/modes/edit_mesh_mode_text.c +++ b/source/blender/draw/modes/edit_mesh_mode_text.c @@ -71,11 +71,11 @@ void DRW_edit_mesh_mode_text_measure_stats( /* make the precision of the display value proportionate to the gridsize */ - if (grid <= 0.01f) conv_float = "%.6g"; - else if (grid <= 0.1f) conv_float = "%.5g"; - else if (grid <= 1.0f) conv_float = "%.4g"; - else if (grid <= 10.0f) conv_float = "%.3g"; - else conv_float = "%.2g"; + if (grid <= 0.01f) { conv_float = "%.6g"; } + else if (grid <= 0.1f) { conv_float = "%.5g"; } + else if (grid <= 1.0f) { conv_float = "%.4g"; } + else if (grid <= 10.0f) { conv_float = "%.3g"; } + else { conv_float = "%.2g"; } if (v3d->overlay.edit_flag & (V3D_OVERLAY_EDIT_EDGE_LEN | V3D_OVERLAY_EDIT_EDGE_ANG | V3D_OVERLAY_EDIT_INDICES)) { BoundBox bb; diff --git a/source/blender/draw/modes/edit_metaball_mode.c b/source/blender/draw/modes/edit_metaball_mode.c index 04b03cb3ac1..600b77f46bf 100644 --- a/source/blender/draw/modes/edit_metaball_mode.c +++ b/source/blender/draw/modes/edit_metaball_mode.c @@ -172,8 +172,12 @@ static void EDIT_METABALL_cache_populate(void *vedata, Object *ob) float draw_stiffness_radius = ml->rad * atanf(ml->s) / (float)M_PI_2; - if ((ml->flag & SELECT) && (ml->flag & MB_SCALE_RAD)) color = col_radius_select; - else color = col_radius; + if ((ml->flag & SELECT) && (ml->flag & MB_SCALE_RAD)) { + color = col_radius_select; + } + else { + color = col_radius; + } if (is_select) { DRW_select_load_id(select_id | MBALLSEL_RADIUS); @@ -181,8 +185,12 @@ static void EDIT_METABALL_cache_populate(void *vedata, Object *ob) DRW_shgroup_call_dynamic_add(group, draw_scale_xform, &ml->rad, color); - if ((ml->flag & SELECT) && !(ml->flag & MB_SCALE_RAD)) color = col_stiffness_select; - else color = col_stiffness; + if ((ml->flag & SELECT) && !(ml->flag & MB_SCALE_RAD)) { + color = col_stiffness_select; + } + else { + color = col_stiffness; + } if (is_select) { DRW_select_load_id(select_id | MBALLSEL_STIFF); |