Beremiz.py
changeset 743 4645a3a398ad
parent 739 90dcb47a99ed
child 747 e7fca1f93de1
equal deleted inserted replaced
741:382b2c848dac 743:4645a3a398ad
  1739             recent_projects.remove(projectpath)
  1739             recent_projects.remove(projectpath)
  1740         recent_projects.insert(0, projectpath)
  1740         recent_projects.insert(0, projectpath)
  1741         self.Config.Write("RecentProjects", cPickle.dumps(recent_projects[:MAX_RECENT_PROJECTS]))
  1741         self.Config.Write("RecentProjects", cPickle.dumps(recent_projects[:MAX_RECENT_PROJECTS]))
  1742         self.Config.Flush()
  1742         self.Config.Flush()
  1743     
  1743     
       
  1744     def ResetPerspective(self):
       
  1745         IDEFrame.ResetPerspective(self)
       
  1746         self.RefreshStatusToolBar()
       
  1747     
       
  1748     def RestoreLastLayout(self):
       
  1749         IDEFrame.RestoreLastLayout(self)
       
  1750         self.RefreshStatusToolBar()
       
  1751     
  1744     def OnNewProjectMenu(self, event):
  1752     def OnNewProjectMenu(self, event):
  1745         if self.CTR is not None and not self.CheckSaveBeforeClosing():
  1753         if self.CTR is not None and not self.CheckSaveBeforeClosing():
  1746             return
  1754             return
  1747         
  1755         
  1748         if not self.Config.HasEntry("lastopenedfolder"):
  1756         if not self.Config.HasEntry("lastopenedfolder"):
  1802                 self.ProjectTree.Enable(True)
  1810                 self.ProjectTree.Enable(True)
  1803                 self.PouInstanceVariablesPanel.SetController(self.Controler)
  1811                 self.PouInstanceVariablesPanel.SetController(self.Controler)
  1804                 self.RefreshConfigRecentProjects(projectpath)
  1812                 self.RefreshConfigRecentProjects(projectpath)
  1805                 if self.EnableDebug:
  1813                 if self.EnableDebug:
  1806                     self.DebugVariablePanel.SetDataProducer(self.CTR)
  1814                     self.DebugVariablePanel.SetDataProducer(self.CTR)
  1807                 self.LoadProjectOrganization()
  1815                 self.LoadProjectLayout()
  1808                 self._Refresh(PROJECTTREE, POUINSTANCEVARIABLESPANEL, LIBRARYTREE)
  1816                 self._Refresh(PROJECTTREE, POUINSTANCEVARIABLESPANEL, LIBRARYTREE)
  1809                 self.RefreshStatusToolBar()
  1817                 self.RefreshStatusToolBar()
  1810             else:
  1818             else:
  1811                 self.ResetView()
  1819                 self.ResetView()
  1812                 self.ShowErrorMessage(result)
  1820                 self.ShowErrorMessage(result)
  1816     
  1824     
  1817     def OnCloseProjectMenu(self, event):
  1825     def OnCloseProjectMenu(self, event):
  1818         if self.CTR is not None and not self.CheckSaveBeforeClosing():
  1826         if self.CTR is not None and not self.CheckSaveBeforeClosing():
  1819             return
  1827             return
  1820         
  1828         
  1821         self.SaveProjectOrganization()
  1829         self.SaveProjectLayout()
  1822         self.ResetView()
  1830         self.ResetView()
  1823         self._Refresh(TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU)
  1831         self._Refresh(TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU)
  1824         self.RefreshStatusToolBar()
  1832         self.RefreshStatusToolBar()
  1825     
  1833     
  1826     def OnSaveProjectMenu(self, event):
  1834     def OnSaveProjectMenu(self, event):