forked from blender/blender
main sync #3
@ -8781,7 +8781,7 @@ uiBut *UI_context_active_but_prop_get(const bContext *C,
|
|||||||
PropertyRNA **r_prop,
|
PropertyRNA **r_prop,
|
||||||
int *r_index)
|
int *r_index)
|
||||||
{
|
{
|
||||||
uiBut *activebut = ui_context_rna_button_active(C);
|
uiBut *activebut = UI_context_active_but_get_respect_menu(C);
|
||||||
|
|
||||||
if (activebut && activebut->rnapoin.data) {
|
if (activebut && activebut->rnapoin.data) {
|
||||||
*r_ptr = activebut->rnapoin;
|
*r_ptr = activebut->rnapoin;
|
||||||
@ -8799,7 +8799,7 @@ uiBut *UI_context_active_but_prop_get(const bContext *C,
|
|||||||
|
|
||||||
void UI_context_active_but_prop_handle(bContext *C, const bool handle_undo)
|
void UI_context_active_but_prop_handle(bContext *C, const bool handle_undo)
|
||||||
{
|
{
|
||||||
uiBut *activebut = ui_context_rna_button_active(C);
|
uiBut *activebut = UI_context_active_but_get_respect_menu(C);
|
||||||
if (activebut) {
|
if (activebut) {
|
||||||
/* TODO(@ideasman42): look into a better way to handle the button change
|
/* TODO(@ideasman42): look into a better way to handle the button change
|
||||||
* currently this is mainly so reset defaults works for the
|
* currently this is mainly so reset defaults works for the
|
||||||
|
@ -868,7 +868,6 @@ uiBlock *ui_block_func_COLOR(bContext *C, uiPopupBlockHandle *handle, void *arg_
|
|||||||
{
|
{
|
||||||
uiBut *but = static_cast<uiBut *>(arg_but);
|
uiBut *but = static_cast<uiBut *>(arg_but);
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
bool show_picker = true;
|
|
||||||
|
|
||||||
block = UI_block_begin(C, handle->region, __func__, UI_EMBOSS);
|
block = UI_block_begin(C, handle->region, __func__, UI_EMBOSS);
|
||||||
|
|
||||||
@ -876,17 +875,9 @@ uiBlock *ui_block_func_COLOR(bContext *C, uiPopupBlockHandle *handle, void *arg_
|
|||||||
block->is_color_gamma_picker = true;
|
block->is_color_gamma_picker = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (but->block) {
|
|
||||||
/* if color block is invoked from a popup we wouldn't be able to set color properly
|
|
||||||
* this is because color picker will close popups first and then will try to figure
|
|
||||||
* out active button RNA, and of course it'll fail
|
|
||||||
*/
|
|
||||||
show_picker = (but->block->flag & UI_BLOCK_POPUP) == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
copy_v3_v3(handle->retvec, but->editvec);
|
copy_v3_v3(handle->retvec, but->editvec);
|
||||||
|
|
||||||
ui_block_colorpicker(block, but, handle->retvec, show_picker);
|
ui_block_colorpicker(block, but, handle->retvec, true);
|
||||||
|
|
||||||
block->flag = UI_BLOCK_LOOP | UI_BLOCK_KEEP_OPEN | UI_BLOCK_OUT_1 | UI_BLOCK_MOVEMOUSE_QUIT;
|
block->flag = UI_BLOCK_LOOP | UI_BLOCK_KEEP_OPEN | UI_BLOCK_OUT_1 | UI_BLOCK_MOVEMOUSE_QUIT;
|
||||||
UI_block_theme_style_set(block, UI_BLOCK_THEME_STYLE_POPUP);
|
UI_block_theme_style_set(block, UI_BLOCK_THEME_STYLE_POPUP);
|
||||||
|
Loading…
Reference in New Issue
Block a user