mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 05:04:10 +00:00
Disconnect TileSet from source editor if no sources
This commit is contained in:
parent
0056acf46f
commit
52435e6f90
@ -2043,6 +2043,13 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw() {
|
||||
}
|
||||
|
||||
void TileSetAtlasSourceEditor::_tile_set_changed() {
|
||||
if (tile_set->get_source_count() == 0) {
|
||||
// No sources, so nothing to do here anymore.
|
||||
tile_set->disconnect("changed", callable_mp(this, &TileSetAtlasSourceEditor::_tile_set_changed));
|
||||
tile_set = Ref<TileSet>();
|
||||
return;
|
||||
}
|
||||
|
||||
tile_set_changed_needs_update = true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user