X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d14a1e28567de23c586bc80017073d0c39f8d18f..d19a83a5ac67c97c208e28289bbf4adaee6b4134:/wxPython/wx/lib/colourdb.py 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