allow want-direct to work with window-type none

This commit is contained in:
David Rose 2007-02-21 21:23:50 +00:00
parent 4ff0a5af0e
commit 86d6eeefaf

View File

@ -307,13 +307,6 @@ class ShowBase(DirectObject.DirectObject):
# This needs to be allocated even if the viewer is off.
self.bufferViewer = BufferViewer()
# Start Tk and DIRECT if specified by Config.prc
fTk = self.config.GetBool('want-tk', 0)
# Start DIRECT if specified in Config.prc or in cluster mode
fDirect = (self.config.GetBool('want-directtools', 0) or
(base.config.GetString("cluster-mode", '') != ''))
# Set fWantTk to 0 to avoid starting Tk with this call
self.startDirect(fWantDirect = fDirect, fWantTk = fTk)
# Start IGLOOP
self.restart()
@ -582,6 +575,14 @@ class ShowBase(DirectObject.DirectObject):
# error not to open a window.
raise StandardError, 'Could not open window.'
# Start Tk and DIRECT if specified by Config.prc
fTk = self.config.GetBool('want-tk', 0)
# Start DIRECT if specified in Config.prc or in cluster mode
fDirect = (self.config.GetBool('want-directtools', 0) or
(base.config.GetString("cluster-mode", '') != ''))
# Set fWantTk to 0 to avoid starting Tk with this call
self.startDirect(fWantDirect = fDirect, fWantTk = fTk)
return self.win != None
def isMainWindowOpen(self):