summaryrefslogtreecommitdiffstats
path: root/src/formula.cpp
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2020-05-09 07:18:51 (GMT)
committeralbert-github <albert.tests@gmail.com>2020-05-09 07:18:51 (GMT)
commitd9ced2a578649f0adb569cf113885852c2e463a2 (patch)
tree6437abbf5956ec4f2840abf05f63dc1cbecafd8a /src/formula.cpp
parent569829a261ebab5a8fb64688caa2f27856f68281 (diff)
downloadDoxygen-d9ced2a578649f0adb569cf113885852c2e463a2.zip
Doxygen-d9ced2a578649f0adb569cf113885852c2e463a2.tar.gz
Doxygen-d9ced2a578649f0adb569cf113885852c2e463a2.tar.bz2
Running Inkscape 1.0
On subsequent calls we should know which inkscape version we have when this is not the case we already tried to determine it, but it failed so we should bail out here without error as an error has already been given.
Diffstat (limited to 'src/formula.cpp')
-rw-r--r--src/formula.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/formula.cpp b/src/formula.cpp
index 5a638d6..204304f 100644
--- a/src/formula.cpp
+++ b/src/formula.cpp
@@ -383,10 +383,18 @@ void FormulaManager::generateImages(const char *path,Format format,HighDPI hd) c
{
sprintf(args,"-l form_%d.svg -z %s_tmp.pdf 2>%s",pageNum,formBase.data(),Portable::devNull());
}
- else
+ else if (inkscapeVersion == 1)
{
sprintf(args,"--export-type=svg --export-filename=form_%d.svg %s_tmp.pdf 2>%s",pageNum,formBase.data(),Portable::devNull());
}
+ else
+ {
+ // on subsequent calls we should know which inkscape version we have
+ // when this is not the case we already tried to determine it, but it failed
+ // so we should bail out here without error as an error has already been given.
+ QDir::setCurrent(oldDir);
+ return;
+ }
Portable::sysTimerStart();
if (Portable::system("inkscape",args)!=0)
{