objdictgen/commondialogs.py
changeset 505 88956169c8b5
parent 500 13fcb9328a02
child 543 ea6cc9b95838
equal deleted inserted replaced
504:ad574af3628d 505:88956169c8b5
  1247         if dialog.ShowModal() == wx.ID_OK:
  1247         if dialog.ShowModal() == wx.ID_OK:
  1248             filepath = dialog.GetPath()
  1248             filepath = dialog.GetPath()
  1249             if os.path.isfile(filepath):
  1249             if os.path.isfile(filepath):
  1250                 result = self.NodeList.ImportEDSFile(filepath)
  1250                 result = self.NodeList.ImportEDSFile(filepath)
  1251                 if result:
  1251                 if result:
  1252                     message = wx.MessageDialog(self, result, "Error", wx.OK|wx.ICON_ERROR)
  1252                     message = wx.MessageDialog(self, "%s\nWould you like to replace it ?"%result, "Question", wx.YES_NO|wx.ICON_QUESTION)
  1253                     message.ShowModal()
  1253                     if message.ShowModal() == wx.ID_YES:
       
  1254                         self.NodeList.ImportEDSFile(filepath, True)
  1254                     message.Destroy()
  1255                     message.Destroy()
  1255         dialog.Destroy()
  1256         dialog.Destroy()
  1256         self.RefreshEDSFile()
  1257         self.RefreshEDSFile()
  1257         event.Skip()
  1258         event.Skip()
  1258 
  1259