--- a/PLCOpenEditor.py Thu Jul 19 11:53:14 2007 +0200
+++ b/PLCOpenEditor.py Thu Jul 19 15:04:41 2007 +0200
@@ -1183,7 +1183,7 @@
def OnRemoveConfigurationMenu(self, event):
configs = self.Controler.GetProjectConfigNames()
- dialog = wxSingleChoiceDialog(self, "Select Configuration to remove:", "Configuration Remove", configs, wxOK|wxCANCEL)
+ dialog = wxSingleChoiceDialog(self, "Select Configuration to remove:", "Remove configuration", configs, wxOK|wxCANCEL)
if dialog.ShowModal() == wxID_OK:
selected = dialog.GetStringSelection()
self.Controler.ProjectRemoveConfiguration(selected)
@@ -1204,6 +1204,17 @@
event.Skip()
def OnRemovePouTransitionMenu(self, event):
+ selected = self.ProjectTree.GetSelection()
+ if self.ProjectTree.GetPyData(selected) == ITEM_POU:
+ pouname = self.ProjectTree.GetItemText(selected)
+ if self.Controler.GetPouBodyType(pouname) == "SFC":
+ transitions = self.Controler.GetPouTransitions(pouname)
+ dialog = wxSingleChoiceDialog(self, "Select Transition to remove:", "Remove transition", transitions, wxOK|wxCANCEL)
+ if dialog.ShowModal() == wxID_OK:
+ selected = dialog.GetStringSelection()
+ self.Controler.ProjectRemovePouTransition(pouname, selected)
+ self.RefreshProjectTree()
+ dialog.Destroy()
event.Skip()
def OnAddPouActionMenu(self, event):
@@ -1220,6 +1231,17 @@
event.Skip()
def OnRemovePouActionMenu(self, event):
+ selected = self.ProjectTree.GetSelection()
+ if self.ProjectTree.GetPyData(selected) == ITEM_POU:
+ pouname = self.ProjectTree.GetItemText(selected)
+ if self.Controler.GetPouBodyType(pouname) == "SFC":
+ actions = self.Controler.GetPouActions(pouname)
+ dialog = wxSingleChoiceDialog(self, "Select Action to remove:", "Remove action", actions, wxOK|wxCANCEL)
+ if dialog.ShowModal() == wxID_OK:
+ selected = dialog.GetStringSelection()
+ self.Controler.ProjectRemovePouAction(pouname, selected)
+ self.RefreshProjectTree()
+ dialog.Destroy()
event.Skip()
def OnAddResourceMenu(self, event):
@@ -1243,7 +1265,7 @@
for config in infos["configs"]:
if config["name"] == config_name:
resources = config["resources"]
- dialog = wxSingleChoiceDialog(self, "Select Resource to remove:", "Resource Remove", resources, wxOK|wxCANCEL)
+ dialog = wxSingleChoiceDialog(self, "Select Resource to remove:", "Remove resource", resources, wxOK|wxCANCEL)
if dialog.ShowModal() == wxID_OK:
resource = dialog.GetStringSelection()
self.Controler.ProjectRemoveConfigurationResource(config_name, resource)