Delaying RestoreLastLayout mechanism to end of LPC specific modules loading procedure to prevent slow startup
--- a/LPCManager.py Mon Oct 01 19:19:41 2012 +0200
+++ b/LPCManager.py Thu Oct 04 18:02:50 2012 +0200
@@ -814,6 +814,11 @@
self.logger.write(_("PLC transferred successfully\n"))
+ # Update a PLCOpenEditor Pou variable location
+ def UpdateProjectVariableLocation(self, old_leading, new_leading):
+ self.Project.updateElementAddress(old_leading, new_leading)
+ self.BufferProject()
+
# Update a PLCOpenEditor Pou variable name
def UpdateProjectVariableName(self, old_name, new_name):
self.Project.updateElementName(old_name, new_name)
@@ -1142,6 +1147,7 @@
self.ProgramTransferred()
if self.AppFrame is not None:
self.AppFrame.CloseObsoleteDebugTabs()
+ self.AppFrame.RefreshPouInstanceVariablesPanel()
self.logger.write(_("Transfer completed successfully.\n"))
else:
self.logger.write_error(_("Transfer failed\n"))
@@ -1306,7 +1312,10 @@
self.ConfNodeInfos = {}
Beremiz.__init__(self, parent, projectOpen, buildpath, ctr, debug)
-
+
+ def Show(self):
+ wx.Frame.Show(self)
+
def OnCloseFrame(self, event):
global frame
@@ -1863,6 +1872,7 @@
def __init__(self, CTR, Log):
cmd.Cmd.__init__(self, stdin=Log, stdout=Log)
self.use_rawinput = False
+ self.restore_last_state = False
self.Log = Log
self.CTR = CTR
@@ -1887,12 +1897,18 @@
self.CTR.SetAppFrame(frame, frame.Log)
frame.Show()
frame.Raise()
+ self.restore_last_state = True
+ self.RestartTimer()
def Refresh(self):
global frame
if frame is not None:
+ if self.restore_last_state:
+ self.restore_last_state = False
+ frame.RestoreLastState()
+ else:
+ frame.RefreshEditor()
frame._Refresh(TITLE, PROJECTTREE, POUINSTANCEVARIABLESPANEL, FILEMENU, EDITMENU)
- frame.RefreshEditor()
frame.RefreshAll()
def Close(self):