BeremizIDE.py
changeset 1767 c74815729afd
parent 1766 c1e5b9f19483
child 1768 691083b5682a
equal deleted inserted replaced
1766:c1e5b9f19483 1767:c74815729afd
   546         if self.CTR is not None:
   546         if self.CTR is not None:
   547             result = MATIEC_ERROR_MODEL.match(line)
   547             result = MATIEC_ERROR_MODEL.match(line)
   548             if result is not None:
   548             if result is not None:
   549                 first_line, first_column, last_line, last_column, error = result.groups()
   549                 first_line, first_column, last_line, last_column, error = result.groups()
   550                 infos = self.CTR.ShowError(self.Log,
   550                 infos = self.CTR.ShowError(self.Log,
   551                                                   (int(first_line), int(first_column)),
   551                                            (int(first_line), int(first_column)),
   552                                                   (int(last_line), int(last_column)))
   552                                            (int(last_line),  int(last_column)))
   553 
   553 
   554     ## Function displaying an Error dialog in PLCOpenEditor.
   554     ## Function displaying an Error dialog in PLCOpenEditor.
   555     #  @return False if closing cancelled.
   555     #  @return False if closing cancelled.
   556     def CheckSaveBeforeClosing(self, title=_("Close Project")):
   556     def CheckSaveBeforeClosing(self, title=_("Close Project")):
   557         if self.CTR.ProjectTestModified():
   557         if self.CTR.ProjectTestModified():
   882         try:
   882         try:
   883             defaultpath = DecodeFileSystemPath(self.Config.Read("lastopenedfolder"))
   883             defaultpath = DecodeFileSystemPath(self.Config.Read("lastopenedfolder"))
   884         except:
   884         except:
   885             defaultpath = os.path.expanduser("~")
   885             defaultpath = os.path.expanduser("~")
   886 
   886 
   887         dialog = wx.DirDialog(self, _("Choose a project"), defaultpath, style=wx.DEFAULT_DIALOG_STYLE |
   887         dialog = wx.DirDialog(self, _("Choose a project"), defaultpath,
   888                                                                                wx.RESIZE_BORDER)
   888                               style=wx.DEFAULT_DIALOG_STYLE | wx.RESIZE_BORDER)
   889         if dialog.ShowModal() == wx.ID_OK:
   889         if dialog.ShowModal() == wx.ID_OK:
   890             self.OpenProject(dialog.GetPath())
   890             self.OpenProject(dialog.GetPath())
   891         dialog.Destroy()
   891         dialog.Destroy()
   892 
   892 
   893     def OpenProject(self, projectpath):
   893     def OpenProject(self, projectpath):