diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-06-15 21:55:37 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-06-15 21:55:37 +0300 |
commit | 0ff87e3a601c7a6db387285582aa1ed34a224b2f (patch) | |
tree | 9d6e9dfe1f28a188c9348c395859c632694d22fb /source/blender/blenkernel/intern/image.c | |
parent | e3d88b021c07dc9e864c55d766b305d7d3b8efb8 (diff) |
Cleanup: code style
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r-- | source/blender/blenkernel/intern/image.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 3e7a9de6968..d165c6dddc9 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -4739,10 +4739,12 @@ bool BKE_image_remove_renderslot(Image *ima, ImageUser *iuser, int index) RenderSlot *current_last_slot = BLI_findlink(&ima->renderslots, ima->last_render_slot); RenderSlot *next_slot; - if (current_slot == remove_slot) - next_slot = BLI_findlink(&ima->renderslots, (index == num_slots-1)? index-1 : index+1); - else + if (current_slot == remove_slot) { + next_slot = BLI_findlink(&ima->renderslots, (index == num_slots - 1) ? index - 1 : index + 1); + } + else { next_slot = current_slot; + } /* If the slot to be removed is the slot with the last render, make another slot the last render slot. */ if (remove_slot == current_last_slot) { |