--- a/PLCOpenEditor.py Fri Jun 08 12:36:24 2012 +0200
+++ b/PLCOpenEditor.py Sun Jun 10 20:21:07 2012 +0200
@@ -1511,8 +1511,9 @@
self.EnsureTabVisible(self.DebugVariablePanel)
wx.CallAfter(self.PouInstanceVariablesPanel.SetPouType, tagname, instance_path)
wx.CallAfter(self._Refresh, FILEMENU, EDITMENU, DISPLAYMENU, EDITORTOOLBAR)
- event.Skip()
-
+ else:
+ event.Skip()
+
def RefreshEditor(self):
selected = self.TabsOpened.GetSelection()
if selected >= 0:
@@ -2179,6 +2180,7 @@
if EditorToolBar:
EditorToolBar.Realize()
self.AUIManager.GetPane("EditorToolBar").BestSize(EditorToolBar.GetBestSize())
+ self.AUIManager.GetPane("EditorToolBar").Hide()
self.AUIManager.Update()
def RefreshEditorToolBar(self):
@@ -2186,10 +2188,11 @@
menu = None
if selected != -1:
window = self.TabsOpened.GetPage(selected)
- if not window.IsDebugging():
- menu = self.Controler.GetEditedElementBodyType(window.GetTagName())
- else:
- menu = "debug"
+ if isinstance(window, (Viewer, TextViewer, GraphicViewer)):
+ if not window.IsDebugging():
+ menu = self.Controler.GetEditedElementBodyType(window.GetTagName())
+ else:
+ menu = "debug"
if menu is not None and menu != self.CurrentMenu:
self.ResetEditorToolBar()
self.CurrentMenu = menu
@@ -2206,8 +2209,9 @@
self.CurrentEditorToolBar.append(id)
EditorToolBar.Realize()
self.AUIManager.GetPane("EditorToolBar").BestSize(EditorToolBar.GetBestSize())
+ self.AUIManager.GetPane("EditorToolBar").Show()
self.AUIManager.Update()
- elif not menu:
+ elif menu is None:
self.ResetEditorToolBar()
self.CurrentMenu = menu
self.ResetCurrentMode()