mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-01 01:07:51 -04:00
Made closeWindow compatible with multi windows
This commit is contained in:
parent
9dc9132399
commit
d5dc94e763
@ -628,6 +628,13 @@ class ShowBase(DirectObject.DirectObject):
|
||||
numRegions = win.getNumDisplayRegions()
|
||||
for i in range(numRegions):
|
||||
dr = win.getDisplayRegion(i)
|
||||
# [gjeon] remove drc in base.direct.drList
|
||||
if base.direct is not None:
|
||||
for drc in base.direct.drList:
|
||||
if drc.cam == dr.getCamera():
|
||||
base.direct.drList.displayRegionList.remove(drc)
|
||||
break
|
||||
|
||||
cam = NodePath(dr.getCamera())
|
||||
|
||||
dr.setCamera(NodePath())
|
||||
@ -652,6 +659,12 @@ class ShowBase(DirectObject.DirectObject):
|
||||
|
||||
# Now we can actually close the window.
|
||||
self.graphicsEngine.removeWindow(win)
|
||||
# [gjeon] remove winControl
|
||||
for winCtrl in self.winControls:
|
||||
if winCtrl.win == win:
|
||||
self.winControls.remove(winCtrl)
|
||||
break
|
||||
|
||||
self.winList.remove(win)
|
||||
|
||||
mainWindow = False
|
||||
|
Loading…
x
Reference in New Issue
Block a user