Fix #120958: Redundant Operations Tips in Status Bar when Transforming #120974

Merged
Harley Acheson merged 1 commits from PratikPB2123/blender:120958-double-keyitems into main 2024-04-24 20:20:11 +02:00
1 changed files with 5 additions and 4 deletions

View File

@ -6569,10 +6569,6 @@ static const wmKeyMapItem *keymap_item_from_enum_item(const wmKeyMap *keymap,
for (wmKeyMapItem *kmi = static_cast<wmKeyMapItem *>(keymap->items.first); kmi; kmi = kmi->next)
{
if (kmi->val == KM_RELEASE) {
/* Assume release events just disable something which was toggled on. */
continue;
}
if (kmi->propvalue == item->value) {
return kmi;
}
@ -6596,6 +6592,11 @@ int uiTemplateStatusBarModalItem(uiLayout *layout,
return 0;
}
if (kmi->val == KM_RELEASE) {
/* Assume release events just disable something which was toggled on. */
return 1;
}
/* Try to merge some known XYZ items to save horizontal space. */
const EnumPropertyItem *item_y = (item[1].identifier) ? item + 1 : nullptr;
const EnumPropertyItem *item_z = (item_y && item[2].identifier) ? item + 2 : nullptr;