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:
authorCampbell Barton <ideasman42@gmail.com>2019-03-18 09:41:37 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-18 09:50:18 +0300
commitb749e43cd3e2a76a58f3fb7b47959b684061ea9b (patch)
treea76ade362ffaa3bbb2342ed3c0fa31761363fb32 /source/blender/editors/interface/interface_region_menu_popup.c
parent8f5ba8e1a1df2e496bbf24573a68cffe564e24db (diff)
Fix color ramp eyedropper menu item
This couldn't be accessed because the poll function was checking the active button. Add a "color_ramp" context pointer which is set by the menu. Alternative fix to D3984
Diffstat (limited to 'source/blender/editors/interface/interface_region_menu_popup.c')
-rw-r--r--source/blender/editors/interface/interface_region_menu_popup.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_region_menu_popup.c b/source/blender/editors/interface/interface_region_menu_popup.c
index 3ec2fd26d36..bd8f62e2abd 100644
--- a/source/blender/editors/interface/interface_region_menu_popup.c
+++ b/source/blender/editors/interface/interface_region_menu_popup.c
@@ -311,7 +311,7 @@ uiPopupBlockHandle *ui_popup_menu_create(
pup = MEM_callocN(sizeof(uiPopupMenu), __func__);
pup->block = UI_block_begin(C, NULL, __func__, UI_EMBOSS_PULLDOWN);
pup->block->flag |= UI_BLOCK_NUMSELECT; /* default menus to numselect */
- pup->layout = UI_block_layout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, MENU_PADDING, style);
+ pup->layout = UI_block_layout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, UI_MENU_PADDING, style);
pup->slideout = but ? ui_block_is_menu(but->block) : false;
pup->but = but;
uiLayoutSetOperatorContext(pup->layout, WM_OP_INVOKE_REGION_WIN);
@@ -377,7 +377,7 @@ uiPopupMenu *UI_popup_menu_begin_ex(bContext *C, const char *title, const char *
pup->block = UI_block_begin(C, NULL, block_name, UI_EMBOSS_PULLDOWN);
pup->block->flag |= UI_BLOCK_POPUP_MEMORY | UI_BLOCK_IS_FLIP;
pup->block->puphash = ui_popup_menu_hash(title);
- pup->layout = UI_block_layout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, MENU_PADDING, style);
+ pup->layout = UI_block_layout(pup->block, UI_LAYOUT_VERTICAL, UI_LAYOUT_MENU, 0, 0, 200, 0, UI_MENU_PADDING, style);
/* note, this intentionally differs from the menu & submenu default because many operators
* use popups like this to select one of their options -