You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Texture region now updates when changing an Atlas
- Removed atlas_changed signal for AtlasTexture - Changes are now handled by _notify_change - Removed unneccesary signal connections - Texture preview now updates in real-time Fixed TextureRegionEditor constantly regenerating
This commit is contained in:
@@ -102,14 +102,24 @@ void TextureEditor::_notification(int p_what) {
|
||||
}
|
||||
}
|
||||
|
||||
void TextureEditor::_changed_callback(Object *p_changed, const char *p_prop) {
|
||||
|
||||
if (!is_visible())
|
||||
return;
|
||||
update();
|
||||
}
|
||||
|
||||
void TextureEditor::edit(Ref<Texture> p_texture) {
|
||||
|
||||
if (!texture.is_null())
|
||||
texture->remove_change_receptor(this);
|
||||
|
||||
texture = p_texture;
|
||||
|
||||
if (!texture.is_null())
|
||||
if (!texture.is_null()) {
|
||||
texture->add_change_receptor(this);
|
||||
update();
|
||||
else {
|
||||
|
||||
} else {
|
||||
hide();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user