fix issue that if located variable was dropped in location column, then address was changed in wrong row (row - 1).
authorAndrey Skvortsov <andrej.skvortzov@gmail.com>
Thu, 24 Nov 2016 15:46:17 +0300
changeset 1577 6a3c29fdcfea
parent 1576 6df9937f130b
child 1578 f8e2a04c4445
fix issue that if located variable was dropped in location column, then address was changed in wrong row (row - 1).

It's not neccessary to carry about label size. YToRow() does the work.
controls/VariablePanel.py
--- a/controls/VariablePanel.py	Thu Nov 24 15:37:03 2016 +0300
+++ b/controls/VariablePanel.py	Thu Nov 24 15:46:17 2016 +0300
@@ -246,7 +246,7 @@
         self.ParentWindow.ParentWindow.Select()
         x, y = self.ParentWindow.VariablesGrid.CalcUnscrolledPosition(x, y)
         col = self.ParentWindow.VariablesGrid.XToCol(x)
-        row = self.ParentWindow.VariablesGrid.YToRow(y - self.ParentWindow.VariablesGrid.GetColLabelSize())
+        row = self.ParentWindow.VariablesGrid.YToRow(y)
         message = None
         element_type = self.ParentWindow.ElementType
         try: