PLCOpenEditor.py
changeset 182 aad505fc468f
parent 181 2981c3d3b088
child 183 99d77995b4ea
equal deleted inserted replaced
181:2981c3d3b088 182:aad505fc468f
  3250     def __init__(self, parent):
  3250     def __init__(self, parent):
  3251         wx.TextDropTarget.__init__(self)
  3251         wx.TextDropTarget.__init__(self)
  3252         self.ParentWindow = parent
  3252         self.ParentWindow = parent
  3253     
  3253     
  3254     def OnDropText(self, x, y, data):
  3254     def OnDropText(self, x, y, data):
       
  3255         x, y = self.ParentWindow.VariablesGrid.CalcUnscrolledPosition(x, y)
  3255         col = self.ParentWindow.VariablesGrid.XToCol(x)
  3256         col = self.ParentWindow.VariablesGrid.XToCol(x)
  3256         row = self.ParentWindow.VariablesGrid.YToRow(y - self.ParentWindow.VariablesGrid.GetColLabelSize())
  3257         row = self.ParentWindow.VariablesGrid.YToRow(y - self.ParentWindow.VariablesGrid.GetColLabelSize())
  3257         if col != wx.NOT_FOUND and row != wx.NOT_FOUND:
  3258         if col != wx.NOT_FOUND and row != wx.NOT_FOUND:
  3258             if self.ParentWindow.Table.GetColLabelValue(col) != "Location":
  3259             if self.ParentWindow.Table.GetColLabelValue(col) != "Location":
  3259                 return
  3260                 return