Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def OnMenu_ImgFolder(self, event):
curdir = os.path.dirname(self.doc.getFilename())
if not curdir: curdir = os.getcwd()
dlg = wx.DirDialog (None, "Select the image folder", "",
wx.DD_DEFAULT_STYLE | wx.DD_DIR_MUST_EXIST)
dlg.CenterOnScreen()
val = dlg.ShowModal()
if val == wx.ID_OK:
DecoImage.sImageFolder = dlg.GetPath()
dlg.Destroy()
self.bModified = True
self.display_page()