Correctly bind optional arguments when emitting Theme changes

This commit is contained in:
Yuri Sizov 2021-10-04 22:22:41 +03:00
parent 5b270278c8
commit 0855e5f8f7

View File

@ -271,7 +271,7 @@ void Theme::set_default_theme_font(const Ref<Font> &p_default_font) {
default_theme_font = p_default_font; default_theme_font = p_default_font;
if (default_theme_font.is_valid()) { if (default_theme_font.is_valid()) {
default_theme_font->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(), CONNECT_REFERENCE_COUNTED); default_theme_font->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(false), CONNECT_REFERENCE_COUNTED);
} }
_emit_theme_changed(); _emit_theme_changed();
@ -314,7 +314,7 @@ void Theme::set_icon(const StringName &p_name, const StringName &p_theme_type, c
icon_map[p_theme_type][p_name] = p_icon; icon_map[p_theme_type][p_name] = p_icon;
if (p_icon.is_valid()) { if (p_icon.is_valid()) {
icon_map[p_theme_type][p_name]->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(), CONNECT_REFERENCE_COUNTED); icon_map[p_theme_type][p_name]->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(false), CONNECT_REFERENCE_COUNTED);
} }
_emit_theme_changed(!existing); _emit_theme_changed(!existing);
@ -401,7 +401,7 @@ void Theme::set_stylebox(const StringName &p_name, const StringName &p_theme_typ
style_map[p_theme_type][p_name] = p_style; style_map[p_theme_type][p_name] = p_style;
if (p_style.is_valid()) { if (p_style.is_valid()) {
style_map[p_theme_type][p_name]->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(), CONNECT_REFERENCE_COUNTED); style_map[p_theme_type][p_name]->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(false), CONNECT_REFERENCE_COUNTED);
} }
_emit_theme_changed(!existing); _emit_theme_changed(!existing);
@ -488,7 +488,7 @@ void Theme::set_font(const StringName &p_name, const StringName &p_theme_type, c
font_map[p_theme_type][p_name] = p_font; font_map[p_theme_type][p_name] = p_font;
if (p_font.is_valid()) { if (p_font.is_valid()) {
font_map[p_theme_type][p_name]->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(), CONNECT_REFERENCE_COUNTED); font_map[p_theme_type][p_name]->connect("changed", callable_mp(this, &Theme::_emit_theme_changed), varray(false), CONNECT_REFERENCE_COUNTED);
} }
_emit_theme_changed(!existing); _emit_theme_changed(!existing);