Merge pull request #2048 from komoto48g/feature-scrpnl

Add self-guard in scrolledpanel:_SetupAfter
This commit is contained in:
Robin Dunn
2021-12-13 21:03:49 -08:00
committed by GitHub

View File

@@ -154,9 +154,10 @@ class ScrolledPanel(wx.ScrolledWindow):
def _SetupAfter(self, scrollToTop):
self.SetVirtualSize(self.GetBestVirtualSize())
if scrollToTop:
self.Scroll(0,0)
if self:
self.SetVirtualSize(self.GetBestVirtualSize())
if scrollToTop:
self.Scroll(0,0)
def OnChildFocus(self, evt):