Closed corranwebster closed 1 year ago
The DirectoryDialog fix works correctly.
The FileDialog fix is incomplete, since the close()
method tries again to access attributes on the control
a few lines down, resulting in
Traceback (most recent call last):
File "mwe.py", line 4, in <module>
outcome = dlg.open()
File "/.../lib/python3.6/site-packages/pyface/i_dialog.py", line 168, in open
self.close()
File "/.../lib/python3.6/site-packages/pyface/ui/qt4/file_dialog.py", line 105, in close
self.wildcard_index = self.control.nameFilters().index(
AttributeError: 'NoneType' object has no attribute 'nameFilters'
Thanks for the catch. That should now be resolved.
This guards against the control having been deleted when we try to get the paths.
Fixes #1158.