mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
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
ee2e231adc
commit
5eafbc7c6e
5 changed files with 10 additions and 0 deletions
|
|
@ -2943,6 +2943,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"),
|
||||
|
|
|
|||
|
|
@ -456,6 +456,8 @@ static void workspace_add_menu(bContext *UNUSED(C), uiLayout *layout, void *temp
|
|||
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);
|
||||
|
|
|
|||
|
|
@ -237,6 +237,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,
|
||||
|
|
|
|||
|
|
@ -202,6 +202,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"),
|
||||
|
|
|
|||
|
|
@ -120,6 +120,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…
Add table
Add a link
Reference in a new issue