Fix T55198: Preferences Keybindings Crash
Operator sanitize function would be called for non operator props. Mistake from 88eafe078a5b5111c.
This commit is contained in:
parent
45e7d609ce
commit
dc26ef081b
Notes:
blender-bot
2023-02-14 05:53:38 +01:00
Referenced by issue #55198, Preferences Keybindings Crash Referenced by issue #55200, Dragging an object into a hidden collection does not immediately hide it Referenced by issue #55202, Edit Mode - 3D Cursor Snapping not working correctly
|
@ -4626,6 +4626,9 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...)
|
|||
PointerRNA *opptr = UI_but_operator_ptr_get(but);
|
||||
wmOperatorType *ot = but->optype;
|
||||
|
||||
/* so the context is passed to itemf functions */
|
||||
WM_operator_properties_sanitize(opptr, false);
|
||||
|
||||
/* if the default property of the operator is enum and it is set,
|
||||
* fetch the tooltip of the selected value so that "Snap" and "Mirror"
|
||||
* operator menus in the Anim Editors will show tooltips for the different
|
||||
|
@ -4645,9 +4648,6 @@ void UI_but_string_info_get(bContext *C, uiBut *but, ...)
|
|||
if (!item) {
|
||||
int i;
|
||||
|
||||
/* so the context is passed to itemf functions */
|
||||
WM_operator_properties_sanitize(ptr, false);
|
||||
|
||||
RNA_property_enum_items_gettexted(C, ptr, prop, &items, &totitems, &free_items);
|
||||
for (i = 0, item = items; i < totitems; i++, item++) {
|
||||
if (item->identifier[0] && item->value == value)
|
||||
|
|
Loading…
Reference in New Issue