From a4514d5c172b2631b856d7bd543c491a02a5c553 Mon Sep 17 00:00:00 2001
From: Johnathan Corgan <johnathan@corganlabs.com>
Date: Tue, 25 Oct 2016 14:08:09 -0700
Subject: Revert "Merge remote-tracking branch 'skoslowski/dpi_fix' into maint"

This reverts commit afadc5cb5564cb9b6136db046adccde5856edf57, reversing
changes made to 915f1b02408a6a4f2ce2ffb2d9336643745aa939.
---
 grc/gui/Block.py | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

(limited to 'grc/gui/Block.py')

diff --git a/grc/gui/Block.py b/grc/gui/Block.py
index 39c6993a37..b9fc12b782 100644
--- a/grc/gui/Block.py
+++ b/grc/gui/Block.py
@@ -95,8 +95,9 @@ class Block(Element, _Block):
         """
         proximity = Constants.BORDER_PROXIMITY_SENSITIVITY
         try: #should evaluate to tuple
-            x, y = Utils.scale(eval(self.get_param('_coordinate').get_value()))
-            fgW, fgH = self.get_parent().get_size()
+            coor = eval(self.get_param('_coordinate').get_value())
+            x, y = map(int, coor)
+            fgW,fgH = self.get_parent().get_size()
             if x <= 0:
                 x = 0
             elif x >= fgW - proximity:
@@ -123,7 +124,7 @@ class Block(Element, _Block):
                 Utils.align_to_grid(coor[0] + offset_x) - offset_x,
                 Utils.align_to_grid(coor[1] + offset_y) - offset_y
             )
-        self.get_param('_coordinate').set_value(str(Utils.scale(coor, reverse=True)))
+        self.get_param('_coordinate').set_value(str(coor))
 
     def bound_move_delta(self, delta_coor):
         """
@@ -140,11 +141,11 @@ class Block(Element, _Block):
 
         try:
             fgW, fgH = self.get_parent().get_size()
-            x, y = Utils.scale(eval(self.get_param('_coordinate').get_value()))
+            x, y = map(int, eval(self.get_param("_coordinate").get_value()))
             if self.is_horizontal():
-                sW, sH = self.W, self.H
+               sW, sH = self.W, self.H
             else:
-                sW, sH = self.H, self.W
+               sW, sH = self.H, self.W
 
             if x + dX < 0:
                 dX = -x
@@ -153,7 +154,7 @@ class Block(Element, _Block):
             if y + dY < 0:
                 dY = -y
             elif dY + y + sH >= fgH:
-                dY = fgH - y - sH
+               dY = fgH - y - sH
         except:
             pass
 
-- 
cgit v1.2.3