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(<property>) since they are unnecesary now.
This commit is contained in:
reduz 2021-02-10 17:18:45 -03:00
parent e8f73124a7
commit 1aa2823fa3
124 changed files with 350 additions and 580 deletions

View file

@ -63,7 +63,7 @@ void TextureLayeredEditor::_notification(int p_what) {
}
}
void TextureLayeredEditor::_changed_callback(Object *p_changed, const char *p_prop) {
void TextureLayeredEditor::_texture_changed() {
if (!is_visible()) {
return;
}
@ -173,7 +173,7 @@ void TextureLayeredEditor::_texture_rect_update_area() {
void TextureLayeredEditor::edit(Ref<TextureLayered> p_texture) {
if (!texture.is_null()) {
texture->remove_change_receptor(this);
texture->disconnect("changed", callable_mp(this, &TextureLayeredEditor::_texture_changed));
}
texture = p_texture;
@ -183,7 +183,7 @@ void TextureLayeredEditor::edit(Ref<TextureLayered> p_texture) {
_make_shaders();
}
texture->add_change_receptor(this);
texture->connect("changed", callable_mp(this, &TextureLayeredEditor::_texture_changed));
update();
texture_rect->set_material(materials[texture->get_layered_type()]);
setting = true;
@ -248,9 +248,6 @@ TextureLayeredEditor::TextureLayeredEditor() {
}
TextureLayeredEditor::~TextureLayeredEditor() {
if (!texture.is_null()) {
texture->remove_change_receptor(this);
}
}
//