Unify and streamline connecting to Resource changes
This commit is contained in:
parent
2c55214068
commit
de4a3fa151
98 changed files with 341 additions and 434 deletions
|
|
@ -77,11 +77,11 @@ void AtlasTexture::set_atlas(const Ref<Texture2D> &p_atlas) {
|
|||
}
|
||||
// Support recursive AtlasTextures.
|
||||
if (Ref<AtlasTexture>(atlas).is_valid()) {
|
||||
atlas->disconnect(CoreStringNames::get_singleton()->changed, callable_mp((Resource *)this, &AtlasTexture::emit_changed));
|
||||
atlas->disconnect_changed(callable_mp((Resource *)this, &AtlasTexture::emit_changed));
|
||||
}
|
||||
atlas = p_atlas;
|
||||
if (Ref<AtlasTexture>(atlas).is_valid()) {
|
||||
atlas->connect(CoreStringNames::get_singleton()->changed, callable_mp((Resource *)this, &AtlasTexture::emit_changed));
|
||||
atlas->connect_changed(callable_mp((Resource *)this, &AtlasTexture::emit_changed));
|
||||
}
|
||||
|
||||
emit_changed();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue