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
This commit is contained in:
committed by
Harley Acheson
parent
2add9e8224
commit
9ed7b03e35
@@ -1421,6 +1421,12 @@ static std::optional<std::string> 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";
|
||||
|
||||
Reference in New Issue
Block a user