Fix #111238: Arrow keys in some menus work in the opposite direction
Since menus are created flipped (from event handling point of view), the
root layout block needs to be flagged `UI_BLOCK_IS_FLIP`.
This was missing for a couple of `uiMenuCreateFunc`, namely:
- creating worspaces menu
- modifiers extra ops
- constraints extra ops
- GP modifiers extra ops
- GP Shader FX extra ops
Same fix as f51de2246c
.
Not crtitcal, but could go into LTS I guess.
Pull Request: https://projects.blender.org/blender/blender/pulls/111341
This commit is contained in:
parent
7d688edbd3
commit
8bae4427ed
|
@ -2986,6 +2986,8 @@ static void constraint_ops_extra_draw(bContext *C, uiLayout *layout, void *con_v
|
|||
|
||||
uiLayoutSetUnitsX(layout, 4.0f);
|
||||
|
||||
UI_block_flag_enable(uiLayoutGetBlock(layout), UI_BLOCK_IS_FLIP);
|
||||
|
||||
/* Apply. */
|
||||
uiItemO(layout,
|
||||
CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Apply"),
|
||||
|
|
|
@ -473,6 +473,8 @@ static void workspace_add_menu(bContext * /*C*/, uiLayout *layout, void *templat
|
|||
WorkspaceConfigFileData *startup_config = workspace_config_file_read(app_template);
|
||||
WorkspaceConfigFileData *builtin_config = workspace_system_file_read(app_template);
|
||||
|
||||
UI_block_flag_enable(uiLayoutGetBlock(layout), UI_BLOCK_IS_FLIP);
|
||||
|
||||
if (startup_config) {
|
||||
LISTBASE_FOREACH (WorkSpace *, workspace, &startup_config->workspaces) {
|
||||
uiLayout *row = uiLayoutRow(layout, false);
|
||||
|
|
|
@ -240,6 +240,8 @@ static void gpencil_modifier_ops_extra_draw(bContext *C, uiLayout *layout, void
|
|||
|
||||
uiLayoutSetUnitsX(layout, 4.0f);
|
||||
|
||||
UI_block_flag_enable(uiLayoutGetBlock(layout), UI_BLOCK_IS_FLIP);
|
||||
|
||||
/* Apply. */
|
||||
if (!(mti->flags & eGpencilModifierTypeFlag_NoApply)) {
|
||||
uiItemO(layout,
|
||||
|
|
|
@ -206,6 +206,8 @@ static void modifier_ops_extra_draw(bContext *C, uiLayout *layout, void *md_v)
|
|||
|
||||
uiLayoutSetUnitsX(layout, 4.0f);
|
||||
|
||||
UI_block_flag_enable(uiLayoutGetBlock(layout), UI_BLOCK_IS_FLIP);
|
||||
|
||||
/* Apply. */
|
||||
uiItemO(layout,
|
||||
CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Apply"),
|
||||
|
|
|
@ -122,6 +122,8 @@ static void gpencil_shaderfx_ops_extra_draw(bContext *C, uiLayout *layout, void
|
|||
|
||||
uiLayoutSetUnitsX(layout, 4.0f);
|
||||
|
||||
UI_block_flag_enable(uiLayoutGetBlock(layout), UI_BLOCK_IS_FLIP);
|
||||
|
||||
/* Duplicate. */
|
||||
uiItemO(layout,
|
||||
CTX_IFACE_(BLT_I18NCONTEXT_OPERATOR_DEFAULT, "Duplicate"),
|
||||
|
|
Loading…
Reference in New Issue