From 81ac0bf759d34e7de921784250d82540cb218718 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Thu, 18 Feb 2021 16:33:00 +0100 Subject: Fix failing "Edit Source" (asserts) while number slider was visible E.g. steps to reproduce: * Enter Vertex Paint mode * In the tool settings, right-click > "Edit Source" When creating a number slider via `layout.prop(..., slider=True)`, the UI code would reallocate the number button to be a number-slider button. That's because we now actually have different button data-structures for these (see e6f0b60c2e911). The edit source code stored data based on the button pointers, which didn't get updated after changing the type. The fix just adds this updating. --- source/blender/editors/include/UI_interface.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 75100326fac..bc013953b1e 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -2545,6 +2545,7 @@ void UI_template_fix_linking(void); /* UI_OT_editsource helpers */ bool UI_editsource_enable_check(void); void UI_editsource_active_but_test(uiBut *but); +void UI_editsource_but_replace(const uiBut *old_but, uiBut *new_but); /* UI_butstore_ helpers */ typedef struct uiButStore uiButStore; -- cgit v1.2.3