--- a/Viewer.py Thu Apr 10 19:24:36 2008 +0200
+++ b/Viewer.py Thu Apr 10 19:25:24 2008 +0200
@@ -110,11 +110,11 @@
if dialog.ShowModal():
blockname = dialog.GetValue()
dialog.Destroy()
- if blockname.upper() not in [name.upper() for name in self.ParentWindow.Controler.GetProjectPouNames()]:
+ if blockname.upper() in [name.upper() for name in self.ParentWindow.Controler.GetProjectPouNames()]:
message = wx.MessageDialog(self.ParentWindow, "\"%s\" pou already exists!"%blockname, "Error", wx.OK|wx.ICON_ERROR)
message.ShowModal()
message.Destroy()
- elif blockname.upper() not in [name.upper() for name in self.ParentWindow.Controler.GetEditedElementVariables(self.ParentWindow.GetTagName())]:
+ elif blockname.upper() in [name.upper() for name in self.ParentWindow.Controler.GetEditedElementVariables(self.ParentWindow.GetTagName())]:
message = wx.MessageDialog(self.ParentWindow, "\"%s\" element for this pou already exists!"%blockname, "Error", wx.OK|wx.ICON_ERROR)
message.ShowModal()
message.Destroy()