Fixed bug when drag'n dropping variables from left panel
authorLaurent Bessard
Thu, 28 Feb 2013 00:20:05 +0100
changeset 952 c1f901403a34
parent 951 7f9a9c47a317
child 953 1fb6cf5a4c4d
Fixed bug when drag'n dropping variables from left panel
controls/DebugVariablePanel.py
--- a/controls/DebugVariablePanel.py	Wed Feb 27 22:35:46 2013 +0100
+++ b/controls/DebugVariablePanel.py	Thu Feb 28 00:20:05 2013 +0100
@@ -354,19 +354,19 @@
                         else:
                             if y > height / 2:
                                 target_idx += 1
-                            if len(values) > 1 and values[2] == "move":
+                            if len(values) > 2 and values[2] == "move":
                                 self.ParentWindow.MoveValue(values[0], target_idx)
                             else:
                                 self.ParentWindow.InsertValue(values[0], target_idx, force=True)
                 else:
                     if y > height / 2:
                         target_idx += 1
-                    if len(values) > 1 and values[2] == "move":
+                    if len(values) > 2 and values[2] == "move":
                         self.ParentWindow.MoveValue(values[0], target_idx)
                     else:
                         self.ParentWindow.InsertValue(values[0], target_idx, force=True)
                     
-            elif len(values) > 1 and values[2] == "move":
+            elif len(values) > 2 and values[2] == "move":
                 self.ParentWindow.MoveValue(values[0])
             else:
                 self.ParentWindow.InsertValue(values[0], force=True)