Fix spline ui zoom again

It was moving the point the mouse pointed to when you zoom

Change-Id: Ic906b75bb3dfa7fa018c6a2d9beaf565c86e6623
Signed-off-by: Ravago Jones <ravagojones@gmail.com>
diff --git a/frc971/control_loops/python/path_edit.py b/frc971/control_loops/python/path_edit.py
index 9a0f7fe..ed500d7 100755
--- a/frc971/control_loops/python/path_edit.py
+++ b/frc971/control_loops/python/path_edit.py
@@ -496,19 +496,16 @@
         elif self.zoom_transform.xx >= 16:
             scale = min(scale, 1)
 
+        # undo the scaled translation that the old zoom transform did
+        x, y = self.invert(self.zoom_transform).transform_point(event.x, event.y)
+
         # move the origin to point
-        self.zoom_transform.translate(event.x, event.y)
+        self.zoom_transform.translate(x, y)
 
         # scale from new origin
         self.zoom_transform.scale(scale, scale)
 
         # move back
-        self.zoom_transform.translate(-event.x, -event.y)
-
-        # snap to the edge when near 1x scaling
-        if 0.99 < self.zoom_transform.xx < 1.01 and -50 < self.zoom_transform.x0 < 50:
-            self.zoom_transform.x0 = 0
-            self.zoom_transform.y0 = 0
-            print("snap")
+        self.zoom_transform.translate(-x, -y)
 
         self.queue_draw()