X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d14a1e28567de23c586bc80017073d0c39f8d18f..609b563c8b9ade4fcde9160f11c7deaf16a9f7b6:/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