Merge pull request #1027 from RobinD42/fix-issue926

Mark wx.FileSystemHandler.OpenFile as a factory function
This commit is contained in:
Robin Dunn
2018-10-04 23:39:02 +08:00
committed by GitHub
3 changed files with 7 additions and 2 deletions

View File

@@ -100,6 +100,10 @@ Changes in this release include the following:
* Fix an issue in wx.lib.agw.aui.AuiManager where the orientation of
an AuiToolBar would not be updated when calling LoadPerspective. (#917)
* Fixed a bug in wx.FileSystemHandler.OpenFile where the object ownership was
not being transferred corrcetly, causing a crash after a premature object
deletion. (#926)

View File

@@ -802,7 +802,7 @@
"DirProperty":"wx.propgrid.",
"DirSelector":"wx.",
"DirSelectorPromptStr":"wx.",
"Direction":"wx.",
"Direction":"wx.DataObject.",
"DisableAsserts":"wx.",
"Display":"wx.",
"DisplayChangedEvent":"wx.",

View File

@@ -48,12 +48,13 @@ def run():
c.find('GetLeftLocation').ignore(False)
c.find('GetProtocol').ignore(False)
c.find('GetRightLocation').ignore(False)
c.find('OpenFile').factory = True
def _fixHandlerClass(klass):
klass.addItem(etgtools.WigCode("""\
virtual bool CanOpen(const wxString& location);
virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);
virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location) /Factory/;
virtual wxString FindFirst(const wxString& spec, int flags = 0);
virtual wxString FindNext();
"""))