Don't set mainWindow as parent of PlayerPanel

Doing so keeps the editorSession alive as a side effect.
This commit is contained in:
David Vierra 2015-03-16 22:09:41 -10:00
parent 9390d9ecfb
commit cd4a8aacbf

View File

@ -23,13 +23,13 @@ class PlayerPropertyChangeCommand(SimpleRevisionCommand):
pass
class PlayerPanel(QtGui.QWidget):
def __init__(self, editorSession, *args, **kwargs):
def __init__(self, editorSession):
"""
:type editorSession: mcedit2.editorsession.EditorSession
:rtype: PlayerPanel
"""
super(PlayerPanel, self).__init__(QtGui.qApp.mainWindow, *args, f=Qt.Tool, **kwargs)
super(PlayerPanel, self).__init__(f=Qt.Tool)
self.editorSession = editorSession
self.selectedUUID = None