From 7ebfaa61f4552a61789c0a5748db5cd1641157e2 Mon Sep 17 00:00:00 2001 From: JayTheBusinessGoose Date: Fri, 19 Jan 2024 21:23:04 -0700 Subject: [PATCH] Fix the Add Room button. --- .../ui/levels/vanilla_levels/levels_tree.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modlunky2/ui/levels/vanilla_levels/levels_tree.py b/src/modlunky2/ui/levels/vanilla_levels/levels_tree.py index 38a06026..ae9e2641 100644 --- a/src/modlunky2/ui/levels/vanilla_levels/levels_tree.py +++ b/src/modlunky2/ui/levels/vanilla_levels/levels_tree.py @@ -30,7 +30,7 @@ def __init__( parent, on_edit, reset_canvas, - on_add_room, + on_insert_room, on_delete_room, on_duplicate_room, on_copy_room, @@ -46,7 +46,7 @@ def __init__( self.config = config self.on_edit = on_edit self.reset_canvas = reset_canvas - self.on_add_room = on_add_room + self.on_insert_room = on_insert_room self.on_delete_room = on_delete_room self.on_duplicate_room = on_duplicate_room self.on_copy_room = on_copy_room @@ -74,8 +74,8 @@ def __init__( self.popup_menu_child.add_command( label="Delete Room", command=self.delete_selected ) - self.popup_menu_child.add_command(label="Add Room", command=self.add_room) - self.popup_menu_parent.add_command(label="Add Room", command=self.add_room) + self.popup_menu_child.add_command(label="Add Room", command=self.insert_room) + self.popup_menu_parent.add_command(label="Add Room", command=self.insert_room) self.popup_menu_parent.add_command(label="Paste Room", command=self.paste) self.bind("", self.popup) # Button-2 on Aqua @@ -179,7 +179,7 @@ def delete_selected(self): self.delete(item_iid) self.reset_canvas() - def add_room(self): + def insert_room(self): item_iid = self.selection()[0] parent_iid = self.parent(item_iid) # gets selected room parent = None @@ -193,7 +193,7 @@ def add_room(self): if entry_index == "": return - new_room = self.on_add_room(self.index(parent)) + new_room = self.on_insert_room(self.index(parent)) self.insert(parent, "end", text=new_room.name or "room") def rename_dialog(self):