mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-27 15:25:54 -04:00
showbase: Fix an entire DirectSession being (re)created on node selection
Closes #1051
This commit is contained in:
parent
f1ca8a9018
commit
7eba53cffa
@ -157,6 +157,7 @@ class ShowBase(DirectObject.DirectObject):
|
||||
self.wantStats = self.config.GetBool('want-pstats', 0)
|
||||
self.wantTk = False
|
||||
self.wantWx = False
|
||||
self.wantDirect = False
|
||||
|
||||
#: Fill this in with a function to invoke when the user "exits"
|
||||
#: the program by closing the main window.
|
||||
@ -3270,7 +3271,12 @@ class ShowBase(DirectObject.DirectObject):
|
||||
def startDirect(self, fWantDirect = 1, fWantTk = 1, fWantWx = 0):
|
||||
self.startTk(fWantTk)
|
||||
self.startWx(fWantWx)
|
||||
|
||||
if self.wantDirect == fWantDirect:
|
||||
return
|
||||
|
||||
self.wantDirect = fWantDirect
|
||||
|
||||
if self.wantDirect:
|
||||
# Use importlib to prevent this import from being picked up
|
||||
# by modulefinder when packaging an application.
|
||||
|
Loading…
x
Reference in New Issue
Block a user