# HG changeset patch # User laurent # Date 1316681812 -7200 # Node ID 0ce12552cf360409a21368b1c6a2e7054f2aad74 # Parent 5c8fa95eb834aa26c8e8d0f9be178e5402f2d435 Fix bug on Windows after removing "Enable Undo/Redo" menu item diff -r 5c8fa95eb834 -r 0ce12552cf36 PLCOpenEditor.py --- a/PLCOpenEditor.py Tue Sep 20 23:59:49 2011 +0200 +++ b/PLCOpenEditor.py Thu Sep 22 10:56:52 2011 +0200 @@ -348,7 +348,7 @@ kind=wx.ITEM_NORMAL, text=_(u'Delete')) self.Bind(wx.EVT_MENU, self.OnUndoMenu, id=wx.ID_UNDO) self.Bind(wx.EVT_MENU, self.OnRedoMenu, id=wx.ID_REDO) - self.Bind(wx.EVT_MENU, self.OnEnableUndoRedoMenu, id=ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO) + #self.Bind(wx.EVT_MENU, self.OnEnableUndoRedoMenu, id=ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO) self.Bind(wx.EVT_MENU, self.OnCutMenu, id=wx.ID_CUT) self.Bind(wx.EVT_MENU, self.OnCopyMenu, id=wx.ID_COPY) self.Bind(wx.EVT_MENU, self.OnPasteMenu, id=wx.ID_PASTE) @@ -989,9 +989,9 @@ undo, redo = self.Controler.GetBufferState() self.EditMenu.Enable(wx.ID_UNDO, undo) self.EditMenu.Enable(wx.ID_REDO, redo) - self.EditMenu.Enable(ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO, True) - self.EditMenu.Check(ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO, - self.Controler.IsProjectBufferEnabled()) + #self.EditMenu.Enable(ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO, True) + #self.EditMenu.Check(ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO, + # self.Controler.IsProjectBufferEnabled()) self.EditMenu.Enable(wx.ID_ADD, True) self.EditMenu.Enable(wx.ID_DELETE, True) if self.TabsOpened.GetPageCount() > 0: @@ -1010,8 +1010,7 @@ else: self.EditMenu.Enable(wx.ID_UNDO, False) self.EditMenu.Enable(wx.ID_REDO, False) - self.EditMenu.Enable(ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO, False) - self.EditMenu.Enable(ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO, False) + #self.EditMenu.Enable(ID_PLCOPENEDITOREDITMENUENABLEUNDOREDO, False) self.EditMenu.Enable(wx.ID_CUT, False) self.EditMenu.Enable(wx.ID_COPY, False) self.EditMenu.Enable(wx.ID_PASTE, False)