summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorAlvin Penner <penner@vaxxine.com>2012-05-14 00:26:47 +0000
committerapenner <penner@vaxxine.com>2012-05-14 00:26:47 +0000
commita7629f1382c0c753d90a0ded19573c664d0b97f6 (patch)
treea4200cf0758a8b9edc70e64d240ab27feed7e2d0 /share
parentpatch by zcgucas for Bug #941597 (Text objects with fill and stroke 'None' ar... (diff)
downloadinkscape-a7629f1382c0c753d90a0ded19573c664d0b97f6.tar.gz
inkscape-a7629f1382c0c753d90a0ded19573c664d0b97f6.zip
extensions. convert2dashes.py. better error handling (Bug 998164)
Fixed bugs: - https://launchpad.net/bugs/998164 (bzr r11360)
Diffstat (limited to 'share')
-rwxr-xr-xshare/extensions/convert2dashes.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/share/extensions/convert2dashes.py b/share/extensions/convert2dashes.py
index ce818688c..cf42a078a 100755
--- a/share/extensions/convert2dashes.py
+++ b/share/extensions/convert2dashes.py
@@ -22,6 +22,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'''
import inkex, cubicsuperpath, bezmisc, simplestyle
+import gettext
+_ = gettext.gettext
def tpoint((x1,y1), (x2,y2), t = 0.5):
return [x1+t*(x2-x1),y1+t*(y2-y1)]
@@ -82,6 +84,10 @@ class SplitIt(inkex.Effect):
node.set('d',cubicsuperpath.formatPath(new))
del style['stroke-dasharray']
node.set('style', simplestyle.formatStyle(style))
+ if node.get(inkex.addNS('type','sodipodi')):
+ del node.attrib[inkex.addNS('type', 'sodipodi')]
+ else:
+ inkex.errormsg(_("The selected object is not a path.\nTry using the procedure Path->Object to Path."))
if __name__ == '__main__':
e = SplitIt()