From: Robin Dunn Date: Tue, 28 Nov 2006 23:12:23 +0000 (+0000) Subject: Avoid assert on Mac X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/800bd336319f8dfb32b16704997156ec7c182315 Avoid assert on Mac git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/demo/ComboCtrl.py b/wxPython/demo/ComboCtrl.py index 9c6b745184..81b89c022c 100644 --- a/wxPython/demo/ComboCtrl.py +++ b/wxPython/demo/ComboCtrl.py @@ -260,7 +260,10 @@ class ComboCtrlWithCustomPopupAnim(wx.combo.ComboCtrl): dc = wx.ScreenDC() bmp = wx.EmptyBitmap(rect.width, rect.height) mdc = wx.MemoryDC(bmp) - mdc.Blit(0, 0, rect.width, rect.height, dc, rect.x, rect.y) + if "wxMac" in wx.PlatformInfo: + pass + else: + mdc.Blit(0, 0, rect.width, rect.height, dc, rect.x, rect.y) del mdc self.aniBackBitmap = bmp @@ -352,7 +355,7 @@ class FileSelectorCombo(wx.combo.ComboCtrl): if dlg.ShowModal() == wx.ID_OK: self.SetValue(dlg.GetPath()) dlg.Destroy() - + self.SetFocus() # Overridden from ComboCtrl to avoid assert since there is no ComboPopup def DoSetPopupControl(self, popup): @@ -412,6 +415,8 @@ class TestPanel(wx.Panel): fgs.Add(wx.StaticText(self, -1, "Custom popup animation")) for word in "How cool was that!? Way COOL!".split(): popup.AddItem(word) + if "wxMac" in wx.PlatformInfo: + cc.SetValue("Sorry, animation not working yet on Mac") cc = FileSelectorCombo(self, size=(250, -1))