Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_handlers.c
| Show First 20 Lines • Show All 992 Lines • ▼ Show 20 Lines | |||||
| static void ui_handle_button_return_submenu(bContext *C, const wmEvent *event, uiBut *but) | static void ui_handle_button_return_submenu(bContext *C, const wmEvent *event, uiBut *but) | ||||
| { | { | ||||
| uiHandleButtonData *data = but->active; | uiHandleButtonData *data = but->active; | ||||
| uiPopupBlockHandle *menu = data->menu; | uiPopupBlockHandle *menu = data->menu; | ||||
| /* copy over return values from the closing menu */ | /* copy over return values from the closing menu */ | ||||
| if ((menu->menuretval & UI_RETURN_OK) || (menu->menuretval & UI_RETURN_UPDATE)) { | if ((menu->menuretval & UI_RETURN_OK) || (menu->menuretval & UI_RETURN_UPDATE)) { | ||||
| if (but->type == UI_BTYPE_COLOR) { | if (but->type == UI_BTYPE_COLOR) { | ||||
| if (menu->menuretval & UI_RETURN_UPDATE) { | |||||
| UI_but_flag_enable(but, UI_BUT_UNDO); | |||||
| } | |||||
| copy_v3_v3(data->vec, menu->retvec); | copy_v3_v3(data->vec, menu->retvec); | ||||
| } | } | ||||
| else if (but->type == UI_BTYPE_MENU) { | else if (but->type == UI_BTYPE_MENU) { | ||||
| data->value = menu->retvalue; | data->value = menu->retvalue; | ||||
| } | } | ||||
| } | } | ||||
| if (menu->menuretval & UI_RETURN_UPDATE) { | if (menu->menuretval & UI_RETURN_UPDATE) { | ||||
| ▲ Show 20 Lines • Show All 992 Lines • Show Last 20 Lines | |||||