mirror of
https://github.com/godotengine/godot.git
synced 2024-12-09 10:09:20 +08:00
Correctly bind optional arguments when emitting Theme changes
This commit is contained in:
parent
5b270278c8
commit
0855e5f8f7
@ -271,7 +271,7 @@ void Theme::set_default_theme_font(const Ref<Font> &p_default_font) {
|
||||
default_theme_font = p_default_font;
|
||||
|
||||
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();
|
||||
@ -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;
|
||||
|
||||
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);
|
||||
@ -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;
|
||||
|
||||
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);
|
||||
@ -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;
|
||||
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user