diff options
| author | Alvin Penner <penner@vaxxine.com> | 2012-05-14 00:26:47 +0000 |
|---|---|---|
| committer | apenner <penner@vaxxine.com> | 2012-05-14 00:26:47 +0000 |
| commit | a7629f1382c0c753d90a0ded19573c664d0b97f6 (patch) | |
| tree | a4200cf0758a8b9edc70e64d240ab27feed7e2d0 /share | |
| parent | patch by zcgucas for Bug #941597 (Text objects with fill and stroke 'None' ar... (diff) | |
| download | inkscape-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-x | share/extensions/convert2dashes.py | 6 |
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() |
