Skip to content

Commit d2c791c

Browse files
committed
Deleting items from hierarchy
1 parent 7eaae53 commit d2c791c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

editor/render.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def paintGL(self):
4242
if self.scene is not None:
4343
self.scene.update()
4444
else:
45-
self.original.mainCamera.Render(self.original.gameObjects, self.original.lights)
45+
self.original.Render()
4646

4747
def resizeGL(self, width, height):
4848
if self.scene is not None:

editor/views.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
22
import pyunity as pyu
3-
from PyQt5.QtCore import QItemSelectionModel, QModelIndex
3+
# from PyQt5.QtCore import QItemSelectionModel, QModelIndex
44
from PyQt5.QtCore import Qt
55
from PyQt5.QtGui import QIcon
66
from PyQt5.QtWidgets import *
@@ -108,8 +108,10 @@ def remove(self):
108108
for item in items:
109109
item.selectAll()
110110
items = self.tree_widget.selectedItems()
111+
self.items = []
111112
for item in items:
112113
print("Removing", item.gameObject.name)
114+
self.tree_widget.invisibleRootItem().removeChild(item)
113115
if self.loaded.Has(item.gameObject):
114116
self.loaded.Remove(item.gameObject)
115117

0 commit comments

Comments
 (0)