cleanup of modules loaded from comment directives
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -339,6 +339,9 @@ class Frame(wx.Frame):
|
|||||||
self.SetAutoLayout(True)
|
self.SetAutoLayout(True)
|
||||||
self.SetSizer(sizer)
|
self.SetSizer(sizer)
|
||||||
|
|
||||||
|
# Save sys.modules names
|
||||||
|
self.modules = set(sys.modules.keys())
|
||||||
|
|
||||||
# Initialize
|
# Initialize
|
||||||
self.Clear()
|
self.Clear()
|
||||||
|
|
||||||
@@ -1381,6 +1384,8 @@ Homepage: http://xrced.sourceforge.net\
|
|||||||
# Handlers
|
# Handlers
|
||||||
clearHandlers()
|
clearHandlers()
|
||||||
g.pullDownMenu.clearCustom()
|
g.pullDownMenu.clearCustom()
|
||||||
|
# Delete modules imported from comment directives
|
||||||
|
map(sys.modules.pop, [m for m in sys.modules if m not in self.modules])
|
||||||
|
|
||||||
def SetModified(self, state=True):
|
def SetModified(self, state=True):
|
||||||
self.modified = state
|
self.modified = state
|
||||||
|
Reference in New Issue
Block a user