]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/wx/lib/colourdb.py
"wxWindows" --> "wxWidgets"
[wxWidgets.git] / wxPython / wx / lib / colourdb.py
index ec9ae457f21dba655e44c85f0770cee2b3b1c6aa..d44b1ea2f041b332a9f8c5ba6b7aabb17c462338 100644 (file)
@@ -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