Add mapped type for wxPGVariant and switch all wxVariant in propgrid to this type. This allows the variant types only available in propgrid to be used the same as the core variant types.

This commit is contained in:
Robin Dunn
2017-02-24 14:32:40 -08:00
parent 19930c9bbd
commit 918a70f5a4
10 changed files with 320 additions and 1 deletions

View File

@@ -91,6 +91,13 @@ def run():
tools.fixWindowClass(c, hideVirtuals=False, ignoreProtected=False)
# Switch all wxVariant types to wxPGVariant, so the propgrid-specific
# version of the MappedType will be used for converting to/from Python
# objects.
for item in module.allItems():
if hasattr(item, 'type') and 'wxVariant' in item.type:
item.type = item.type.replace('wxVariant', 'wxPGVariant')
#-----------------------------------------------------------------
tools.doCommonTweaks(module)
tools.runGenerators(module)