aboutsummaryrefslogtreecommitdiff
path: root/game/src/Game/GameSession/NationManagementScreen/PopulationMenu.gd
diff options
context:
space:
mode:
author hop311 <hop3114@gmail.com>2024-07-26 22:59:12 +0200
committer hop311 <hop3114@gmail.com>2024-07-26 22:59:12 +0200
commit164db4eb8f24e87755e02bae0e539f4f266e15b9 (patch)
tree9ab24e79d47c2c56dfd68ebf89e419d30324c92c /game/src/Game/GameSession/NationManagementScreen/PopulationMenu.gd
parent46c3009075be36577ab7dbea263655e428833b20 (diff)
Free removed child nodes + `godot::` cleanupfree-on-remove
Diffstat (limited to 'game/src/Game/GameSession/NationManagementScreen/PopulationMenu.gd')
-rw-r--r--game/src/Game/GameSession/NationManagementScreen/PopulationMenu.gd3
1 files changed, 2 insertions, 1 deletions
diff --git a/game/src/Game/GameSession/NationManagementScreen/PopulationMenu.gd b/game/src/Game/GameSession/NationManagementScreen/PopulationMenu.gd
index 2799dd4..ad15fbb 100644
--- a/game/src/Game/GameSession/NationManagementScreen/PopulationMenu.gd
+++ b/game/src/Game/GameSession/NationManagementScreen/PopulationMenu.gd
@@ -104,6 +104,7 @@ func _generate_province_list_row(index : int, type : MenuSingleton.ProvinceListE
if _province_list_panels[index]:
_province_listbox.remove_child(_province_list_panels[index])
+ _province_list_panels[index].queue_free()
_province_list_types[index] = MenuSingleton.LIST_ENTRY_NONE
_province_list_indices[index] = -1
@@ -540,7 +541,7 @@ func _update_distributions():
child.set_mouse_filter(Control.MOUSE_FILTER_IGNORE)
list.add_child(child)
- for list_index in min(list.get_child_count(), distribution_info.size()):
+ for list_index : int in min(list.get_child_count(), distribution_info.size()):
var child : Panel = list.get_child(list_index)