# HG changeset patch
# User lbessard
# Date 1204275159 -3600
# Node ID aad505fc468f826e3985facd9ee407abddae3e7b
# Parent  2981c3d3b08887963943d3263740d4101f29f763
Bug on variable location Drag'n Drop fixed

diff -r 2981c3d3b088 -r aad505fc468f PLCOpenEditor.py
--- a/PLCOpenEditor.py	Fri Feb 29 09:01:09 2008 +0100
+++ b/PLCOpenEditor.py	Fri Feb 29 09:52:39 2008 +0100
@@ -3252,6 +3252,7 @@
         self.ParentWindow = parent
     
     def OnDropText(self, x, y, data):
+        x, y = self.ParentWindow.VariablesGrid.CalcUnscrolledPosition(x, y)
         col = self.ParentWindow.VariablesGrid.XToCol(x)
         row = self.ParentWindow.VariablesGrid.YToRow(y - self.ParentWindow.VariablesGrid.GetColLabelSize())
         if col != wx.NOT_FOUND and row != wx.NOT_FOUND: