mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -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):
|
def handleDelete(self):
|
||||||
oldSelectedNPs = base.direct.selected.getSelectedAsList()
|
oldSelectedNPs = base.direct.selected.getSelectedAsList()
|
||||||
|
oldUIDs = []
|
||||||
for oldNP in oldSelectedNPs:
|
for oldNP in oldSelectedNPs:
|
||||||
obj = self.objectMgr.findObjectByNodePath(oldNP)
|
obj = self.objectMgr.findObjectByNodePath(oldNP)
|
||||||
if obj:
|
if obj:
|
||||||
self.ui.sceneGraphUI.delete(obj[OG.OBJ_UID])
|
oldUIDs.append(obj[OG.OBJ_UID])
|
||||||
|
|
||||||
action = ActionDeleteObj(self)
|
action = ActionDeleteObj(self)
|
||||||
self.actionMgr.push(action)
|
self.actionMgr.push(action)
|
||||||
action()
|
action()
|
||||||
|
|
||||||
|
for uid in oldUIDs:
|
||||||
|
self.ui.sceneGraphUI.delete(uid)
|
||||||
|
|
||||||
## reply = wx.MessageBox("Do you want to delete selected?", "Delete?",
|
## reply = wx.MessageBox("Do you want to delete selected?", "Delete?",
|
||||||
## wx.YES_NO | wx.ICON_QUESTION)
|
## wx.YES_NO | wx.ICON_QUESTION)
|
||||||
## if reply == wx.YES:
|
## if reply == wx.YES:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user