--- a/PLCOpenEditor.py Wed Jun 03 10:37:49 2009 +0200
+++ b/PLCOpenEditor.py Wed Jun 03 12:47:21 2009 +0200
@@ -2110,7 +2110,7 @@
def OnLibraryTreeItemSelected(self, event):
selected = event.GetItem()
pydata = self.LibraryTree.GetPyData(selected)
- if pydata["type"] != CATEGORY:
+ if pydata is not None and pydata["type"] != CATEGORY:
blocktype = self.Controler.GetBlockType(self.LibraryTree.GetItemText(selected), pydata["inputs"], debug = self.Debug)
if blocktype:
self.LibraryComment.SetValue(blocktype["comment"])
@@ -2123,7 +2123,7 @@
def OnLibraryTreeBeginDrag(self, event):
selected = event.GetItem()
pydata = self.LibraryTree.GetPyData(selected)
- if selected is not None and pydata["type"] == BLOCK:
+ if pydata is not None and pydata["type"] == BLOCK:
data = wx.TextDataObject(str((self.LibraryTree.GetItemText(selected),
pydata["block_type"], "", pydata["inputs"])))
dragSource = wx.DropSource(self.LibraryTree)