diff options
Diffstat (limited to 'Master/texmf-dist/asymptote/GUI/xasy2asy.py')
-rwxr-xr-x | Master/texmf-dist/asymptote/GUI/xasy2asy.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Master/texmf-dist/asymptote/GUI/xasy2asy.py b/Master/texmf-dist/asymptote/GUI/xasy2asy.py index 4b2d0274f74..12bccb453cf 100755 --- a/Master/texmf-dist/asymptote/GUI/xasy2asy.py +++ b/Master/texmf-dist/asymptote/GUI/xasy2asy.py @@ -716,7 +716,7 @@ class xasyItem(Qc.QObject): image = Qg.QImage(file) elif fileformat == 'svg': if containsClip: - image = xs.SvgObject(file) + image = xs.SvgObject(self.asyengine.tempDirName+file) else: image = Qs.QSvgRenderer(file) assert image.isValid() @@ -826,7 +826,7 @@ class xasyItem(Qc.QObject): for i in range(len(imageInfos)): box, key, localCount, useClip = imageInfos[i] l, b, r, t = [float(a) for a in box.split()] - name = "{:s}_{:d}.{:s}".format(self.asyengine.tempDirName, i, fileformat) + name = "_{:d}.{:s}".format(i, fileformat) self.imageHandleQueue.put((name, fileformat, (l, -t, r, -b), i, key, localCount, useClip)) @@ -873,12 +873,15 @@ class xasyItem(Qc.QObject): n += 1 - if text == "Error\n": - self.imageHandleQueue.put(("ERROR", fin.readline())) - else: - render() + if raw_text != "Error\n": + if text == "Error\n": + self.imageHandleQueue.put(("ERROR", fin.readline())) + else: + render() - self.asy2psmap = asyTransform(xu.listize(fin.readline().rstrip(),float)) + self.asy2psmap = asyTransform(xu.listize(fin.readline().rstrip(),float)) + else: + self.asy2psmap = identity() self.imageHandleQueue.put((None,)) self.asyfied = True |