X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d14a1e28567de23c586bc80017073d0c39f8d18f..d8d7193d767beecab7335e58df1fa0d25ae1e2ea:/wxPython/wx/lib/colourdb.py?ds=sidebyside diff --git a/wxPython/wx/lib/colourdb.py b/wxPython/wx/lib/colourdb.py index ec9ae457f2..d44b1ea2f0 100644 --- a/wxPython/wx/lib/colourdb.py +++ b/wxPython/wx/lib/colourdb.py @@ -661,9 +661,12 @@ _haveUpdated = False def updateColourDB(): global _haveUpdated if not _haveUpdated: - from wxPython.wx import wxTheColourDatabase + import wx + assert wx.GetApp() is not None, "You must have a wx.App object before you can use the colour database." cl = getColourInfoList() + for info in cl: - wxTheColourDatabase.Append(*info) - + wx.TheColourDatabase.Append(*info) + + _haveUpdated = True