mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-24 10:07:17 +01:00
ItemLists does not support negative indexing.
This commit is contained in:
parent
a94f302003
commit
9116814193
@ -309,7 +309,7 @@ void AtlasMergingDialog::update_tile_set(Ref<LayeredTileSet> p_tile_set) {
|
|||||||
if (texture.is_valid()) {
|
if (texture.is_valid()) {
|
||||||
String item_text = vformat(TTR("%s (ID: %d)"), texture->get_path().get_file(), source_id);
|
String item_text = vformat(TTR("%s (ID: %d)"), texture->get_path().get_file(), source_id);
|
||||||
atlas_merging_atlases_list->add_item(item_text, texture);
|
atlas_merging_atlases_list->add_item(item_text, texture);
|
||||||
atlas_merging_atlases_list->set_item_metadata(-1, source_id);
|
atlas_merging_atlases_list->set_item_metadata(atlas_merging_atlases_list->get_item_count() - 1, source_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -246,7 +246,7 @@ void LayeredTileMapLayerEditorTilesPlugin::_update_tile_set_sources_list() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sources_list->add_item(item_text, texture);
|
sources_list->add_item(item_text, texture);
|
||||||
sources_list->set_item_metadata(-1, source_id);
|
sources_list->set_item_metadata(sources_list->get_item_count() - 1, source_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sources_list->get_item_count() > 0) {
|
if (sources_list->get_item_count() > 0) {
|
||||||
@ -466,7 +466,7 @@ void LayeredTileMapLayerEditorTilesPlugin::_update_scenes_collection_view() {
|
|||||||
}
|
}
|
||||||
if (scene_tiles_list->get_item_count() == 0) {
|
if (scene_tiles_list->get_item_count() == 0) {
|
||||||
scene_tiles_list->add_item(TTR("The selected scene collection source has no scenes. Add scenes in the LayeredTileSet bottom tab."));
|
scene_tiles_list->add_item(TTR("The selected scene collection source has no scenes. Add scenes in the LayeredTileSet bottom tab."));
|
||||||
scene_tiles_list->set_item_disabled(-1, true);
|
scene_tiles_list->set_item_disabled(scene_tiles_list->get_item_count() - 1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Icon size update.
|
// Icon size update.
|
||||||
|
@ -220,7 +220,7 @@ void LayeredTileSetEditor::_update_sources_list(int force_selected_id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
sources_list->add_item(item_text, texture);
|
sources_list->add_item(item_text, texture);
|
||||||
sources_list->set_item_metadata(-1, source_id);
|
sources_list->set_item_metadata(sources_list->get_item_count() - 1, source_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set again the current selected item if needed.
|
// Set again the current selected item if needed.
|
||||||
|
@ -351,7 +351,7 @@ void LayeredTileSetScenesCollectionSourceEditor::_update_scenes_list() {
|
|||||||
}
|
}
|
||||||
if (scene_tiles_list->get_item_count() == 0) {
|
if (scene_tiles_list->get_item_count() == 0) {
|
||||||
scene_tiles_list->add_item(TTR("Drag and drop scenes here or use the Add button."));
|
scene_tiles_list->add_item(TTR("Drag and drop scenes here or use the Add button."));
|
||||||
scene_tiles_list->set_item_disabled(-1, true);
|
scene_tiles_list->set_item_disabled(scene_tiles_list->get_item_count() - 1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reselect if needed.
|
// Reselect if needed.
|
||||||
|
Loading…
Reference in New Issue
Block a user