mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
Added support undo selection in new LE
This commit is contained in:
parent
1438fa0078
commit
c3b70b120d
@ -141,8 +141,10 @@ class DirectSession(DirectObject):
|
||||
|
||||
self.actionEvents = [
|
||||
['select', self.select],
|
||||
['DIRECT-select', self.selectCB],
|
||||
['deselect', self.deselect],
|
||||
['deselectAll', self.deselectAll],
|
||||
['DIRECT-preDeselectAll', self.deselectAllCB],
|
||||
['highlightAll', self.selected.highlightAll],
|
||||
['preRemoveNodePath', self.deselect],
|
||||
# Scene graph explorer functions
|
||||
@ -651,7 +653,11 @@ class DirectSession(DirectObject):
|
||||
return Task.cont
|
||||
|
||||
def select(self, nodePath, fMultiSelect = 0,
|
||||
fSelectTag = 1, fResetAncestry = 1, fLEPane = 0):
|
||||
fSelectTag = 1, fResetAncestry = 1, fLEPane=0, fUndo=1):
|
||||
messenger.send('DIRECT-select', [nodePath, fMultiSelect, fSelectTag, fResetAncestry, fLEPane, fUndo])
|
||||
|
||||
def selectCB(self, nodePath, fMultiSelect = 0,
|
||||
fSelectTag = 1, fResetAncestry = 1, fLEPane = 0, fUndo=1):
|
||||
dnp = self.selected.select(nodePath, fMultiSelect, fSelectTag)
|
||||
if dnp:
|
||||
messenger.send('DIRECT_preSelectNodePath', [dnp])
|
||||
@ -725,6 +731,9 @@ class DirectSession(DirectObject):
|
||||
messenger.send('DIRECT_deselectedNodePath', [dnp])
|
||||
|
||||
def deselectAll(self):
|
||||
messenger.send('DIRECT-preDeselectAll')
|
||||
|
||||
def deselectAllCB(self):
|
||||
self.selected.deselectAll()
|
||||
# Hide the manipulation widget
|
||||
if self.manipulationControl.fMultiView:
|
||||
|
Loading…
x
Reference in New Issue
Block a user