Fix #147752: Button swap is missing custom tooltip callbacks
Tooltips could crash where callbacks receive the wrong argument. This is because the swap function was missing the `custom_tip_func` callback, but was swapping the callback argument. Pull Request: https://projects.blender.org/blender/blender/pulls/147806
This commit is contained in:
@@ -972,6 +972,7 @@ static void ui_but_update_old_active_from_new(uiBut *oldbut, uiBut *but)
|
||||
/* Move tooltip from new to old. */
|
||||
std::swap(oldbut->tip_func, but->tip_func);
|
||||
std::swap(oldbut->tip_arg, but->tip_arg);
|
||||
std::swap(oldbut->tip_custom_func, but->tip_custom_func);
|
||||
std::swap(oldbut->tip_arg_free, but->tip_arg_free);
|
||||
std::swap(oldbut->tip_quick_func, but->tip_quick_func);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user