]> git.lyx.org Git - lyx.git/blobdiff - src/graphics/GraphicsParams.C
fix typo that put too many include paths for most people
[lyx.git] / src / graphics / GraphicsParams.C
index 6353f7b51c0aaf736387b634f782dab2104e58a9..b0cf8e1312aef3ac214617c7b558d2fbaeb91b1c 100644 (file)
 #include "GraphicsParams.h"
 #include "insets/insetgraphicsParams.h"
 #include "lyxrc.h"
+#include "support/filetools.h"
 #include "support/lstrings.h"
+#include "support/LAssert.h"
 
 namespace grfx {
 
-GParams::GParams(InsetGraphicsParams const & iparams)
-       : filename(iparams.filename),
-         width(0),
+GParams::GParams(InsetGraphicsParams const & iparams, string const & filepath)
+       : width(0),
          height(0),
          scale(0),
          angle(0)
 {
+       filename = iparams.filename;
+       if (!filepath.empty()) {
+               filename = MakeAbsPath(filename, filepath);
+       }
+
        if (iparams.clip)
                bb = iparams.bb;