Beremiz.py
changeset 1976 5d72971a36a3
parent 1960 372ec456664c
child 1977 9b3655ed2e24
equal deleted inserted replaced
1975:6b357f1e3134 1976:5d72971a36a3
   114         if wx.VERSION < (3, 0, 0):
   114         if wx.VERSION < (3, 0, 0):
   115             wx.InitAllImageHandlers()
   115             wx.InitAllImageHandlers()
   116 
   116 
   117     def ShowSplashScreen(self):
   117     def ShowSplashScreen(self):
   118         class Splash(AdvancedSplash):
   118         class Splash(AdvancedSplash):
       
   119             Painted = False
   119             def OnPaint(_self, event):  # pylint: disable=no-self-argument
   120             def OnPaint(_self, event):  # pylint: disable=no-self-argument
   120                 AdvancedSplash.OnPaint(_self, event)
   121                 AdvancedSplash.OnPaint(_self, event)
   121                 wx.CallAfter(self.AppStart)
   122                 if not _self.Painted:  # trigger app start only once
       
   123                     _self.Painted = True
       
   124                     wx.CallAfter(self.AppStart)
   122         bmp = wx.Image(self.splashPath).ConvertToBitmap()
   125         bmp = wx.Image(self.splashPath).ConvertToBitmap()
   123         self.splash = Splash(None,
   126         self.splash = Splash(None,
   124                              bitmap=bmp,
   127                              bitmap=bmp,
   125                              agwStyle=AS_NOTIMEOUT | AS_CENTER_ON_SCREEN)
   128                              agwStyle=AS_NOTIMEOUT | AS_CENTER_ON_SCREEN)
   126 
   129