diff options
| author | Nicolas Dufour <nicoduf@yahoo.fr> | 2016-11-27 20:44:30 +0000 |
|---|---|---|
| committer | JazzyNico <nicoduf@yahoo.fr> | 2016-11-27 20:44:30 +0000 |
| commit | 35d3eeae3779e4b48e0484ca23d5254786aae588 (patch) | |
| tree | a14fe9d8299298f572e669043ad945c2a2afe810 | |
| parent | Remove unneeded "#include <arpa/inet.h>" in "cairo-utils.cpp" (diff) | |
| download | inkscape-35d3eeae3779e4b48e0484ca23d5254786aae588.tar.gz inkscape-35d3eeae3779e4b48e0484ca23d5254786aae588.zip | |
[Bug #1641111] extension Visualize Path/Measure path... fails
Fixed bugs:
- https://launchpad.net/bugs/1641111
(bzr r15281)
| -rwxr-xr-x | share/extensions/measure.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/share/extensions/measure.py b/share/extensions/measure.py index 2711727cf..b605ffe93 100755 --- a/share/extensions/measure.py +++ b/share/extensions/measure.py @@ -34,6 +34,7 @@ TODO: ''' # standard library import locale +import re # local library import inkex import simplestyle @@ -211,7 +212,7 @@ class Length(inkex.Effect): factor = 1.0 doc = self.document.getroot() if doc.get('viewBox'): - [viewx, viewy, vieww, viewh] = doc.get('viewBox').split(' ') + (viewx, viewy, vieww, viewh) = re.sub(' +|, +|,',' ',doc.get('viewBox')).strip().split(' ', 4) factor = self.unittouu(doc.get('width'))/float(vieww) if self.unittouu(doc.get('height'))/float(viewh) < factor: factor = self.unittouu(doc.get('height'))/float(viewh) |
