Skip to content

Commit 8431997

Browse files
committed
Removing multiple items
1 parent 927089e commit 8431997

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

editor/views.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,12 @@ def new_sibling(self):
8686
self.add_item(new, item)
8787

8888
def remove(self):
89-
item = self.tree_widget.currentItem()
90-
if item is None:
89+
items = self.tree_widget.selectedItems()
90+
if len(items) == 0:
9191
print("Nothing selected")
9292
return
93-
print("Removing " + item.gameObject.name)
93+
for item in items:
94+
print("Removing " + item.gameObject.name)
9495

9596
def add_item(self, gameObject, parent=None):
9697
item = HierarchyItem(gameObject)

0 commit comments

Comments
 (0)