# HG changeset patch # User lbessard # Date 1185346088 -7200 # Node ID 7fcc129a06ce9b2049bc41c8f704308138070ec7 # Parent 4864f7f01e1d5e5f6bba7eb9b010194fe267105c Some bugs fixed diff -r 4864f7f01e1d -r 7fcc129a06ce objdictgen/networkedit.py --- a/objdictgen/networkedit.py Sat Jul 21 10:39:25 2007 +0200 +++ b/objdictgen/networkedit.py Wed Jul 25 08:48:08 2007 +0200 @@ -840,9 +840,9 @@ self.Manager.SetCurrentNodeInfos(name, id, type, description) self.RefreshBufferState() self.RefreshProfileMenu() - selected = self.FileOpened.GetSelection() + selected = self.NetworkNodes.GetSelection() if selected >= 0: - window = self.FileOpened.GetPage(selected) + window = self.NetworkNodes.GetPage(selected) window.RefreshTable() event.Skip() diff -r 4864f7f01e1d -r 7fcc129a06ce objdictgen/nodelist.py --- a/objdictgen/nodelist.py Sat Jul 21 10:39:25 2007 +0200 +++ b/objdictgen/nodelist.py Wed Jul 25 08:48:08 2007 +0200 @@ -99,9 +99,11 @@ files = os.listdir(self.EDSFolder) for file in files: - result = self.LoadEDS(file) - if result != None: - return result + filepath = os.path.join(self.EDSFolder, file) + if os.path.isfile(filepath) and os.path.splitext(filepath)[-1] == ".eds": + result = self.LoadEDS(file) + if result != None: + return result result = self.LoadMasterNode(netname) if result != None: diff -r 4864f7f01e1d -r 7fcc129a06ce objdictgen/subindextable.py --- a/objdictgen/subindextable.py Sat Jul 21 10:39:25 2007 +0200 +++ b/objdictgen/subindextable.py Wed Jul 25 08:48:08 2007 +0200 @@ -502,25 +502,26 @@ event.Skip() def BeginDrag(self): - row = self.SubindexGrid.GetGridCursorRow() - col = self.SubindexGrid.GetGridCursorCol() - if not self.Editable and col == 0: - selected = self.IndexList.GetSelection() - if selected != wxNOT_FOUND: - index = self.ListIndex[selected] - subindex = self.SubindexGrid.GetGridCursorRow() - entry_infos = self.Manager.GetEntryInfos(index) - if not entry_infos["struct"] & OD_MultipleSubindexes or row != 0: - subentry_infos = self.Manager.GetSubentryInfos(index, subindex) - typeinfos = self.Manager.GetEntryInfos(subentry_infos["type"]) - if subentry_infos["pdo"] and typeinfos: - bus_id = self.Parent.GetBusId() - node_id = self.Parent.GetCurrentNodeId() - size = typeinfos["size"] - data = wxTextDataObject(str(("%s%d.%d.%d.%d"%(SizeConversion[size], bus_id, node_id, index, subindex), "location"))) - dragSource = wxDropSource(self.SubindexGrid) - dragSource.SetData(data) - dragSource.DoDragDrop() + if not self.Parent.ModeSolo: + row = self.SubindexGrid.GetGridCursorRow() + col = self.SubindexGrid.GetGridCursorCol() + if not self.Editable and col == 0: + selected = self.IndexList.GetSelection() + if selected != wxNOT_FOUND: + index = self.ListIndex[selected] + subindex = self.SubindexGrid.GetGridCursorRow() + entry_infos = self.Manager.GetEntryInfos(index) + if not entry_infos["struct"] & OD_MultipleSubindexes or row != 0: + subentry_infos = self.Manager.GetSubentryInfos(index, subindex) + typeinfos = self.Manager.GetEntryInfos(subentry_infos["type"]) + if subentry_infos["pdo"] and typeinfos: + bus_id = self.Parent.GetBusId() + node_id = self.Parent.GetCurrentNodeId() + size = typeinfos["size"] + data = wxTextDataObject(str(("%s%d.%d.%d.%d"%(SizeConversion[size], bus_id, node_id, index, subindex), "location"))) + dragSource = wxDropSource(self.SubindexGrid) + dragSource.SetData(data) + dragSource.DoDragDrop() #------------------------------------------------------------------------------- # Refresh Functions