remove clear and reset execution order buttons in popup menu in SFC and LD viewers.
authorSergey Surkov <surkovsv93@gmail.com>
Thu, 01 Dec 2016 16:59:16 +0300
changeset 1586 e17406dd4f06
parent 1585 60c0db313ec9
child 1587 b1be42401522
remove clear and reset execution order buttons in popup menu in SFC and LD viewers.
editors/Viewer.py
--- a/editors/Viewer.py	Thu Dec 01 16:52:28 2016 +0300
+++ b/editors/Viewer.py	Thu Dec 01 16:59:16 2016 +0300
@@ -577,11 +577,11 @@
             [ID_CLEAR_EXEC_ORDER, ID_RESET_EXEC_ORDER] = [wx.NewId() for i in xrange(2)]
 
             # Create menu items
-            self.AddMenuItems(menu, [
-                 (ID_CLEAR_EXEC_ORDER, wx.ITEM_NORMAL, _(u'Clear Execution Order'), '', self.OnClearExecutionOrderMenu),
-                 (ID_RESET_EXEC_ORDER, wx.ITEM_NORMAL, _(u'Reset Execution Order'), '', self.OnResetExecutionOrderMenu)])
-
-            menu.AppendSeparator()
+            if self.CurrentLanguage == 'FBD':
+                self.AddMenuItems(menu, [
+                    (ID_CLEAR_EXEC_ORDER, wx.ITEM_NORMAL, _(u'Clear Execution Order'), '', self.OnClearExecutionOrderMenu),
+                    (ID_RESET_EXEC_ORDER, wx.ITEM_NORMAL, _(u'Reset Execution Order'), '', self.OnResetExecutionOrderMenu)])
+                menu.AppendSeparator()
 
             add_menu = wx.Menu(title='')
             self.AddAddMenuItems(add_menu)