Fix bugs with Viewer objects dialogs
authorLaurent Bessard
Sun, 19 Aug 2012 16:24:11 +0200
changeset 743 75576aea4555
parent 742 75096d6c271c
child 744 bebdef08f684
Fix bugs with Viewer objects dialogs
PLCOpenEditor.py
dialogs/FBDBlockDialog.py
--- a/PLCOpenEditor.py	Sun Aug 19 16:07:01 2012 +0200
+++ b/PLCOpenEditor.py	Sun Aug 19 16:24:11 2012 +0200
@@ -1316,12 +1316,12 @@
                 MenuToolBar.EnableTool(wx.ID_CUT, True)
                 self.EditMenu.Enable(wx.ID_COPY, True)
                 MenuToolBar.EnableTool(wx.ID_COPY, True)
-#                if self.GetCopyBuffer() is not None:
-#                    self.EditMenu.Enable(wx.ID_PASTE, True)
-#                    MenuToolBar.EnableTool(wx.ID_PASTE, True)
-#                else:
-#                    self.EditMenu.Enable(wx.ID_PASTE, False)
-#                    MenuToolBar.EnableTool(wx.ID_PASTE, False)
+                if self.GetCopyBuffer() is not None:
+                    self.EditMenu.Enable(wx.ID_PASTE, True)
+                    MenuToolBar.EnableTool(wx.ID_PASTE, True)
+                else:
+                    self.EditMenu.Enable(wx.ID_PASTE, False)
+                    MenuToolBar.EnableTool(wx.ID_PASTE, False)
                 self.EditMenu.Enable(wx.ID_SELECTALL, True)
             else:
                 self.EditMenu.Enable(wx.ID_CUT, False)
--- a/dialogs/FBDBlockDialog.py	Sun Aug 19 16:07:01 2012 +0200
+++ b/dialogs/FBDBlockDialog.py	Sun Aug 19 16:24:11 2012 +0200
@@ -114,7 +114,7 @@
         right_gridsizer.AddWindow(self.Preview, flag=wx.GROW)
         
         button_sizer = self.CreateButtonSizer(wx.OK|wx.CANCEL|wx.CENTRE)
-        #self.Bind(wx.EVT_BUTTON, self.OnOK, button_sizer.GetAffirmativeButton())
+        self.Bind(wx.EVT_BUTTON, self.OnOK, button_sizer.GetAffirmativeButton())
         main_sizer.AddSizer(button_sizer, border=20, 
               flag=wx.ALIGN_RIGHT|wx.BOTTOM|wx.LEFT|wx.RIGHT)