You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
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:
@@ -96,7 +96,7 @@ void AudioStreamEditor::_preview_changed(ObjectID p_which) {
|
||||
}
|
||||
}
|
||||
|
||||
void AudioStreamEditor::_changed_callback(Object *p_changed, const char *p_prop) {
|
||||
void AudioStreamEditor::_audio_changed() {
|
||||
if (!is_visible()) {
|
||||
return;
|
||||
}
|
||||
@@ -172,7 +172,7 @@ void AudioStreamEditor::_seek_to(real_t p_x) {
|
||||
|
||||
void AudioStreamEditor::edit(Ref<AudioStream> p_stream) {
|
||||
if (!stream.is_null()) {
|
||||
stream->remove_change_receptor(this);
|
||||
stream->disconnect("changed", callable_mp(this, &AudioStreamEditor::_audio_changed));
|
||||
}
|
||||
|
||||
stream = p_stream;
|
||||
@@ -182,7 +182,7 @@ void AudioStreamEditor::edit(Ref<AudioStream> p_stream) {
|
||||
_duration_label->set_text(text);
|
||||
|
||||
if (!stream.is_null()) {
|
||||
stream->add_change_receptor(this);
|
||||
stream->connect("changed", callable_mp(this, &AudioStreamEditor::_audio_changed));
|
||||
update();
|
||||
} else {
|
||||
hide();
|
||||
|
||||
Reference in New Issue
Block a user