--- a/Beremiz.py Tue May 22 06:11:37 2012 +0200
+++ b/Beremiz.py Tue May 22 06:41:54 2012 +0200
@@ -1741,6 +1741,14 @@
self.Config.Write("RecentProjects", cPickle.dumps(recent_projects[:MAX_RECENT_PROJECTS]))
self.Config.Flush()
+ def ResetPerspective(self):
+ IDEFrame.ResetPerspective(self)
+ self.RefreshStatusToolBar()
+
+ def RestoreLastLayout(self):
+ IDEFrame.RestoreLastLayout(self)
+ self.RefreshStatusToolBar()
+
def OnNewProjectMenu(self, event):
if self.CTR is not None and not self.CheckSaveBeforeClosing():
return
@@ -1804,7 +1812,7 @@
self.RefreshConfigRecentProjects(projectpath)
if self.EnableDebug:
self.DebugVariablePanel.SetDataProducer(self.CTR)
- self.LoadProjectOrganization()
+ self.LoadProjectLayout()
self._Refresh(PROJECTTREE, POUINSTANCEVARIABLESPANEL, LIBRARYTREE)
self.RefreshStatusToolBar()
else:
@@ -1818,7 +1826,7 @@
if self.CTR is not None and not self.CheckSaveBeforeClosing():
return
- self.SaveProjectOrganization()
+ self.SaveProjectLayout()
self.ResetView()
self._Refresh(TITLE, EDITORTOOLBAR, FILEMENU, EDITMENU)
self.RefreshStatusToolBar()
--- a/ConfTreeNodeEditor.py Tue May 22 06:11:37 2012 +0200
+++ b/ConfTreeNodeEditor.py Tue May 22 06:41:54 2012 +0200
@@ -237,10 +237,13 @@
else:
self.Editor.Initialize(self.ParamsEditor)
- def __init__(self, parent, tagname, controler, window):
+ def __init__(self, parent, controler, window, tagname=""):
EditorPanel.__init__(self, parent, tagname, window, controler)
-
- self.SetIcon(wx.Bitmap(self.Controler.GetIconPath(), wx.BITMAP_TYPE_PNG))
+
+ icon_path = self.Controler.GetIconPath()
+ if icon_path is None:
+ icon_path = opjimg("Extension")
+ self.SetIcon(wx.Bitmap(icon_path, wx.BITMAP_TYPE_PNG))
def __del__(self):
self.Controler.OnCloseEditor(self)
@@ -257,6 +260,15 @@
def HasNoModel(self):
return False
+ def GetBufferState(self):
+ return False, False
+
+ def Undo(self):
+ pass
+
+ def Redo(self):
+ pass
+
def EnableScrolling(self, enable):
self.ScrollingEnabled = enable
--- a/ConfigTreeNode.py Tue May 22 06:11:37 2012 +0200
+++ b/ConfigTreeNode.py Tue May 22 06:41:54 2012 +0200
@@ -15,6 +15,7 @@
from util.misc import GetClassImporter
from PLCControler import PLCControler, LOCATION_CONFNODE
+from ConfTreeNodeEditor import ConfTreeNodeEditor
_BaseParamsClass = GenerateClassesFromXSDstring("""<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
@@ -39,7 +40,7 @@
CTNMaxCount = None
ConfNodeMethods = []
LibraryControler = None
- EditorType = None
+ EditorType = ConfTreeNodeEditor
IconPath = None
def _AddParamsMembers(self):
--- a/ProjectNodeEditor.py Tue May 22 06:11:37 2012 +0200
+++ b/ProjectNodeEditor.py Tue May 22 06:41:54 2012 +0200
@@ -11,6 +11,8 @@
self.Editor = wx.ScrolledWindow(prnt, -1, size=wx.Size(-1, -1),
style=wx.TAB_TRAVERSAL|wx.SUNKEN_BORDER|wx.HSCROLL|wx.VSCROLL)
self.Editor.SetBackgroundColour(WINDOW_COLOUR)
+ self.Editor.Bind(wx.EVT_SIZE, self.OnWindowResize)
+ self.Editor.Bind(wx.EVT_MOUSEWHEEL, self.OnMouseWheel)
self.ParamsEditor = self.Editor
# Variable allowing disabling of Editor scroll when Popup shown
@@ -40,7 +42,7 @@
else:
tagname = ""
- ConfTreeNodeEditor.__init__(self, parent, tagname, controler, window)
+ ConfTreeNodeEditor.__init__(self, parent, controler, window, tagname)
def GetTagName(self):
return self.Controler.CTNName()
--- a/c_ext/CFileEditor.py Tue May 22 06:11:37 2012 +0200
+++ b/c_ext/CFileEditor.py Tue May 22 06:41:54 2012 +0200
@@ -815,7 +815,7 @@
self.ConfNodeEditor.SetSizer(self.MainSizer)
def __init__(self, parent, controler, window):
- ConfTreeNodeEditor.__init__(self, parent, "", controler, window)
+ ConfTreeNodeEditor.__init__(self, parent, controler, window)
def GetBufferState(self):
return self.Controler.GetBufferState()
--- a/py_ext/PythonEditor.py Tue May 22 06:11:37 2012 +0200
+++ b/py_ext/PythonEditor.py Tue May 22 06:41:54 2012 +0200
@@ -230,7 +230,7 @@
def __init__(self, parent, controler, window):
- ConfTreeNodeEditor.__init__(self, parent, "", controler, window)
+ ConfTreeNodeEditor.__init__(self, parent, controler, window)
self.DisableEvents = False
self.CurrentAction = None