# HG changeset patch
# User Andrey Skvortsov <andrej.skvortzov@gmail.com>
# Date 1479991577 -10800
# Node ID 6a3c29fdcfea45bf24ceeaa6aa4be3370b08d0da
# Parent  6df9937f130b0f2677b0b4f2d4620b86d9a67ca0
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.

diff -r 6df9937f130b -r 6a3c29fdcfea 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: