Page MenuHome

Cleanup: Simplify outliner mode column drawing function
ClosedPublic

Authored by Hans Goudey (HooglyBoogly) on Oct 19 2020, 9:14 PM.

Details

Summary

This patch simplifies the mode column button function.

The main change is moving the checks for whether to draw the button to the
beginning of the function, and centralizing them a bit. This also uses a
shorthand variable for ob_active. Hopefully this makes the function a bit
more readable, it also makes additional code for an upcoming bug fix
less messy.

Diff Detail

Repository
rB Blender

Event Timeline

Hans Goudey (HooglyBoogly) requested review of this revision.Oct 19 2020, 9:14 PM
Hans Goudey (HooglyBoogly) created this revision.

Looks much cleaner! I didn't notice any difference in behavior after this change.

source/blender/editors/space_outliner/outliner_draw.c
1957–1960

Perhaps add the missing . I forgot if that's okay to include with this cleanup

This revision is now accepted and ready to land.Oct 20 2020, 6:20 AM
Hans Goudey (HooglyBoogly) marked an inline comment as done.Oct 22 2020, 10:46 PM