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:
Lukas Tönne
2025-10-10 15:28:51 +02:00
parent 264efc1446
commit 577a66aea2

View File

@@ -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);