From 9ed7b03e35246c41dddde2b9e1ea4704e82ee069 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Sat, 4 Jan 2025 00:58:20 +0100 Subject: [PATCH] Fix #100652: Correct Shortcut Hovering Editor Type Button When hovering over the "Editor Type" button it always shows Shift-F1 as the shortcut no matter what the current Editor Type is. We already have specific code for "SCREEN_OT_space_type_set_or_cycle" for the items on the popup menu, but it doesn't handle the case of hovering the menu itself. This adds just adds a line to handle this. Pull Request: https://projects.blender.org/blender/blender/pulls/132612 --- source/blender/editors/interface/interface.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/blender/editors/interface/interface.cc b/source/blender/editors/interface/interface.cc index 9151d93c435..eb41ef38067 100644 --- a/source/blender/editors/interface/interface.cc +++ b/source/blender/editors/interface/interface.cc @@ -1421,6 +1421,12 @@ static std::optional ui_but_event_property_operator_string(const bC prop = RNA_struct_find_property(ptr, prop_id); prop_index = -1; + if (prop_enum_value == -1) { + /* Get the current value for Editor menu. #100652 */ + prop_enum_value = RNA_property_enum_get(ptr, prop); + prop_enum_value_ok = (prop_enum_value != -1); + } + opnames = ctx_enum_opnames_for_Area_ui_type; opnames_len = ARRAY_SIZE(ctx_enum_opnames_for_Area_ui_type); prop_enum_value_id = "space_type";