controls/PouInstanceVariablesPanel.py
changeset 1369 9bd4c783c98d
parent 1364 e9e17d3b2849
child 1498 b11045a2f17c
--- a/controls/PouInstanceVariablesPanel.py	Wed Oct 16 23:54:44 2013 +0200
+++ b/controls/PouInstanceVariablesPanel.py	Thu Oct 17 12:20:36 2013 +0200
@@ -428,14 +428,15 @@
                         if callback is not None:
                             callback(item_infos)
                 
-                elif flags & CT.TREE_HITTEST_ONITEMLABEL and item_infos.var_class in ITEMS_VARIABLE:
-                    self.ParentWindow.EnsureTabVisible(
-                        self.ParentWindow.DebugVariablePanel)
-                    item_path = "%s.%s" % (instance_path, item_infos.name)
-                    data = wx.TextDataObject(str((item_path, "debug")))
-                    dragSource = wx.DropSource(self.VariablesList)
-                    dragSource.SetData(data)
-                    dragSource.DoDragDrop()
+                    elif (flags & CT.TREE_HITTEST_ONITEMLABEL and 
+                          item_infos.var_class in ITEMS_VARIABLE):
+                        self.ParentWindow.EnsureTabVisible(
+                            self.ParentWindow.DebugVariablePanel)
+                        item_path = "%s.%s" % (instance_path, item_infos.name)
+                        data = wx.TextDataObject(str((item_path, "debug")))
+                        dragSource = wx.DropSource(self.VariablesList)
+                        dragSource.SetData(data)
+                        dragSource.DoDragDrop()
         event.Skip()
 
     def OnVariablesListKeyDown(self, event):