mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
Fixed an issue of deletion from scenegraph
This commit is contained in:
parent
4fca72f556
commit
a252c1010d
@ -150,14 +150,19 @@ class LevelEditorBase(DirectObject):
|
||||
|
||||
def handleDelete(self):
|
||||
oldSelectedNPs = base.direct.selected.getSelectedAsList()
|
||||
oldUIDs = []
|
||||
for oldNP in oldSelectedNPs:
|
||||
obj = self.objectMgr.findObjectByNodePath(oldNP)
|
||||
if obj:
|
||||
self.ui.sceneGraphUI.delete(obj[OG.OBJ_UID])
|
||||
oldUIDs.append(obj[OG.OBJ_UID])
|
||||
|
||||
action = ActionDeleteObj(self)
|
||||
self.actionMgr.push(action)
|
||||
action()
|
||||
|
||||
for uid in oldUIDs:
|
||||
self.ui.sceneGraphUI.delete(uid)
|
||||
|
||||
## reply = wx.MessageBox("Do you want to delete selected?", "Delete?",
|
||||
## wx.YES_NO | wx.ICON_QUESTION)
|
||||
## if reply == wx.YES:
|
||||
|
Loading…
x
Reference in New Issue
Block a user