UI Code Quality: Use derived struct for curve profile buttons
Continuing the work from rB49f088e2d093. Differential Revision: https://developer.blender.org/D8561
This commit is contained in:
@@ -2179,13 +2179,10 @@ void ui_draw_but_CURVEPROFILE(ARegion *region,
|
||||
{
|
||||
uint i;
|
||||
float fx, fy;
|
||||
CurveProfile *profile;
|
||||
if (but->editprofile) {
|
||||
profile = but->editprofile;
|
||||
}
|
||||
else {
|
||||
profile = (CurveProfile *)but->poin;
|
||||
}
|
||||
|
||||
uiButCurveProfile *but_profile = (uiButCurveProfile *)but;
|
||||
CurveProfile *profile = (but_profile->edit_profile == NULL) ? (CurveProfile *)but->poin :
|
||||
but_profile->edit_profile;
|
||||
|
||||
/* Calculate offset and zoom. */
|
||||
float zoomx = (BLI_rcti_size_x(rect) - 2.0f) / BLI_rctf_size_x(&profile->view_rect);
|
||||
|
||||
Reference in New Issue
Block a user