Rework modifying tile source ID
This commit is contained in:
parent
54ba3cf768
commit
2a5db5949f
5 changed files with 80 additions and 5 deletions
|
|
@ -156,7 +156,7 @@ void TileMapEditorTilesPlugin::_update_tile_set_sources_list() {
|
|||
|
||||
// Common to all type of sources.
|
||||
if (!source->get_name().is_empty()) {
|
||||
item_text = vformat(TTR("%s (ID: %d)"), source->get_name(), source_id);
|
||||
item_text = source->get_name();
|
||||
}
|
||||
|
||||
// Atlas source.
|
||||
|
|
@ -165,7 +165,7 @@ void TileMapEditorTilesPlugin::_update_tile_set_sources_list() {
|
|||
texture = atlas_source->get_texture();
|
||||
if (item_text.is_empty()) {
|
||||
if (texture.is_valid()) {
|
||||
item_text = vformat(TTR("%s (ID: %d)"), texture->get_path().get_file(), source_id);
|
||||
item_text = texture->get_path().get_file();
|
||||
} else {
|
||||
item_text = vformat(TTR("No Texture Atlas Source (ID: %d)"), source_id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue