From 9b58f808c2aae0a94b52680cc2be9edc53a57647 Mon Sep 17 00:00:00 2001
From: Sergey Sharybin <sergey.vfx@gmail.com>
Date: Fri, 21 Oct 2016 16:31:28 +0200
Subject: [PATCH] Fix T49791: Distorted curves when importing SVG

---
 io_curve_svg/import_svg.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/io_curve_svg/import_svg.py b/io_curve_svg/import_svg.py
index b09dfd1b2..c8c492ff1 100644
--- a/io_curve_svg/import_svg.py
+++ b/io_curve_svg/import_svg.py
@@ -652,6 +652,11 @@ class SVGPathParser:
 
                 return
 
+            last = self._spline['points'][-1]
+            if last['handle_right_type'] == 'VECTOR' and handle_left_type == 'FREE':
+                last['handle_right'] = (last['x'], last['y'])
+                last['handle_right_type'] = 'FREE'
+
         point = {'x': x,
                  'y': y,
 
-- 
GitLab