From 1aa2823fa32c7a4b41d806418ec99949fc44ffb3 Mon Sep 17 00:00:00 2001 From: reduz Date: Wed, 10 Feb 2021 17:18:45 -0300 Subject: Removed _change_notify -For inspector refresh, the inspector now detects if a property change by polling a few times per second and then does update the control if so. This process is very cheap. -For property list refresh, a new signal (property_list_changed) was added to Object. _change_notify() is replaced by notify_property_list_changed() -Changed all objects using the old method to the signal, or just deleted the calls to _change_notify() since they are unnecesary now. --- scene/gui/label.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'scene/gui/label.cpp') diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index 540d238b74..453ecc802c 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -538,7 +538,6 @@ void Label::set_visible_characters(int p_amount) { if (get_total_character_count() > 0) { percent_visible = (float)p_amount / (float)get_total_character_count(); } - _change_notify("percent_visible"); update(); } @@ -555,7 +554,6 @@ void Label::set_percent_visible(float p_percent) { visible_chars = get_total_character_count() * p_percent; percent_visible = p_percent; } - _change_notify("visible_chars"); update(); } @@ -610,7 +608,7 @@ bool Label::_set(const StringName &p_name, const Variant &p_value) { update(); } } - _change_notify(); + notify_property_list_changed(); return true; } -- cgit v1.2.3