From 9251b1567bc3aef9de507bb4b11266eb05dbb75b Mon Sep 17 00:00:00 2001 From: Thomas Ploentzke Date: Sun, 3 Mar 2019 09:57:17 +0100 Subject: [PATCH 1/2] Fix a svg parse issue Fix a cash issue on certain svg files where the svg path description ends with a capital Z --- mDrawGui/SvgParser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mDrawGui/SvgParser.py b/mDrawGui/SvgParser.py index 603f99e..5c960c5 100644 --- a/mDrawGui/SvgParser.py +++ b/mDrawGui/SvgParser.py @@ -264,8 +264,8 @@ def parsePath(self,node): d = node.getAttribute("d") ds = d.replace("e-","ee") ds=ds.replace("-"," -").replace("s", " s ").replace("S", " S ").replace("c", " c ").replace("C", " C ").replace("v", " v ").replace("V", " V ") - ds=ds.replace("l", " l ").replace("L"," L ").replace("A", " A ").replace("a", " a ").replace(",", " ").replace("M", "M ").replace("h", " h ").replace("H", " H ").replace("m"," m ").replace('z',' z ') - ds=ds.replace("q", " q ").replace("Q", " Q ") + ds=ds.replace("l", " l ").replace("L"," L ").replace("A", " A ").replace("a", " a ").replace(",", " ").replace("M", "M ").replace("h", " h ").replace("H", " H ").replace("m"," m ").replace("z"," z ") + ds=ds.replace("q", " q ").replace("Q", " Q ").replace("Z"," Z ") ss=ds.split() for i in range(len(ss)): ss[i] = ss[i].replace("ee","e-") From c7aa4f8e4fc4b03944c8896a020ee378a95d17ea Mon Sep 17 00:00:00 2001 From: Thomas Ploentzke Date: Mon, 4 Mar 2019 20:55:38 +0100 Subject: [PATCH 2/2] Make mDraw.py executable https://github.com/Makeblock-official/mDrawBot/pull/50/commits/74bcdeb1b0131ce5ba491e32c4fc2a4848291b63 --- mDrawGui/mDraw.py | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 mDrawGui/mDraw.py diff --git a/mDrawGui/mDraw.py b/mDrawGui/mDraw.py old mode 100644 new mode 100755 index fef6447..6e7746b --- a/mDrawGui/mDraw.py +++ b/mDrawGui/mDraw.py @@ -1,3 +1,4 @@ +#!/usr/bin/python3 import sys import os import threading