Skip to content

Commit

Permalink
Fixed a bug in MultiArea. When a page was removed from the area, its …
Browse files Browse the repository at this point in the history
…panel was not destroyed. This caused any new pages created afterwards to appear frozen, as the old page would still exist and block event reception.
  • Loading branch information
skyjake committed Jan 3, 2007
1 parent 9a190cf commit c5e0c6b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion snowberry/sb/widget/area.py
Expand Up @@ -254,7 +254,7 @@ def destroy(self):
if not self.parentArea:
# Standalone areas are never added to a sizer.
return

# Detach and destroy the sizer of this area.
self.parentArea.getWxWidget().Detach(self.getWxWidget())
self.getWxWidget().Destroy()
Expand Down Expand Up @@ -776,7 +776,9 @@ def removePage(self, identifier):
sizer = area.panel.GetContainingSizer()
if sizer:
sizer.Detach(area.panel)

area.destroy()
area.panel.Destroy()

# Remove the page from the dictionary.
del self.pages[identifier]
Expand Down

0 comments on commit c5e0c6b

Please sign in to comment.