diff --git a/etg/propgridadvprops.py b/etg/propgridadvprops.py index ba0a7346..e09b229f 100644 --- a/etg/propgridadvprops.py +++ b/etg/propgridadvprops.py @@ -40,8 +40,12 @@ def run(): # Tweak the parsed meta objects in the module object as needed for # customizing the generated code and docstrings. - c = module.find('wxMultiChoiceProperty') + c = module.find('wxFontProperty') assert isinstance(c, etgtools.ClassDef) + tools.fixDialogProperty(c) + + c = module.find('wxMultiChoiceProperty') + tools.fixDialogProperty(c) # Fix up the ctor taking a wxArrayString to be the one with the easier and # expected API diff --git a/etg/propgridprops.py b/etg/propgridprops.py index c57f2f1c..d0e18fb4 100644 --- a/etg/propgridprops.py +++ b/etg/propgridprops.py @@ -39,11 +39,6 @@ ITEMS = [ 'wxPGInDialogValidator', #--------------------------------------------------------------------------- -def _fixDialogProperty(klass): - m = klass.find('DisplayEditorDialog') - m.ignore(False) - m.find('value').inOut = True - def run(): # Parse the XML file(s) building a collection of Extractor objects @@ -92,16 +87,16 @@ def run(): c.detailedDoc = [] c = module.find('wxLongStringProperty') - _fixDialogProperty(c) + tools.fixDialogProperty(c) c = module.find('wxDirProperty') - _fixDialogProperty(c) + tools.fixDialogProperty(c) c = module.find('wxFileProperty') - _fixDialogProperty(c) + tools.fixDialogProperty(c) c = module.find('wxArrayStringProperty') - _fixDialogProperty(c) + tools.fixDialogProperty(c) c.find('GenerateValueAsString').ignore(False) c = module.find('wxPGArrayEditorDialog') diff --git a/etgtools/tweaker_tools.py b/etgtools/tweaker_tools.py index 3025b64c..09c798be 100644 --- a/etgtools/tweaker_tools.py +++ b/etgtools/tweaker_tools.py @@ -408,6 +408,17 @@ def fixTextClipboardMethods(klass): except extractors.ExtractorError: pass + +def fixDialogProperty(klass): + """ + Fix classes derived from EditorDialogProperty to ensure that their + DisplayEditorDialog method is visible. + """ + m = klass.find('DisplayEditorDialog') + m.ignore(False) + m.find('value').inOut = True + + def removeVirtuals(klass): """ Sometimes methods are marked as virtual but probably don't ever need to be