objdictgen/subindextable.py
changeset 243 7fcc129a06ce
parent 242 4864f7f01e1d
child 254 f2b0acb54e65
--- 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