Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2020-08-14 05:00:50 +0300
committerHans Goudey <h.goudey@me.com>2020-08-14 05:00:50 +0300
commitcd179b5048c927781401397c8cbd71dfb3ef6766 (patch)
tree9b1a19d44018eb32f7e781b07c3faaa6e2f8f04c /source/blender/editors/interface/interface_draw.c
parent0ab21bf06ae021539c91d24d772813b6132ba382 (diff)
UI Code Quality: Use derived struct for color ramp buttons
The same changes as rB570044e9f412 and rB0ab21bf06ae0.
Diffstat (limited to 'source/blender/editors/interface/interface_draw.c')
-rw-r--r--source/blender/editors/interface/interface_draw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_draw.c b/source/blender/editors/interface/interface_draw.c
index 1ed43697cd1..6cd274c8b15 100644
--- a/source/blender/editors/interface/interface_draw.c
+++ b/source/blender/editors/interface/interface_draw.c
@@ -1639,7 +1639,9 @@ void ui_draw_but_COLORBAND(uiBut *but, const uiWidgetColors *UNUSED(wcol), const
struct ColorManagedDisplay *display = ui_block_cm_display_get(but->block);
uint pos_id, col_id;
- ColorBand *coba = (ColorBand *)(but->editcoba ? but->editcoba : but->poin);
+ uiButColorBand *but_coba = (uiButColorBand *)but;
+ ColorBand *coba = (but_coba->edit_coba == NULL) ? (ColorBand *)but->poin : but_coba->edit_coba;
+
if (coba == NULL) {
return;
}