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