Updated to get rid of apply and map, and only update the ColourDB once.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23919 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -17,7 +17,7 @@ Load color names/values from the rgb.txt file on my system...
|
|||||||
|
|
||||||
|
|
||||||
def getColourList():
|
def getColourList():
|
||||||
return map(lambda x: x[0], getColourInfoList())
|
return [ x[0] for x in getColourInfoList() ]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -656,10 +656,14 @@ def getColourInfoList():
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
_haveUpdated = False
|
||||||
|
|
||||||
def updateColourDB():
|
def updateColourDB():
|
||||||
from wxPython.wx import wxTheColourDatabase
|
global _haveUpdated
|
||||||
cl = getColourInfoList()
|
if not _haveUpdated:
|
||||||
for info in cl:
|
from wxPython.wx import wxTheColourDatabase
|
||||||
apply(wxTheColourDatabase.Append, info)
|
cl = getColourInfoList()
|
||||||
|
for info in cl:
|
||||||
|
wxTheColourDatabase.Append(*info)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user