]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetgraphics.C
* support/os_unix.C (canAutoOpen, autoOpenFile): on Mac OS X, use
[lyx.git] / src / insets / insetgraphics.C
index f5067fc64fe8f137fbf52b54ba5765ff3f7e1d78..a012012cf302bb21c0cafd520d96648681ad196e 100644 (file)
@@ -64,7 +64,6 @@ TODO
 #include "FuncStatus.h"
 #include "gettext.h"
 #include "LaTeXFeatures.h"
-#include "lyx_main.h"
 #include "lyxlength.h"
 #include "lyxlex.h"
 #include "metricsinfo.h"
@@ -234,10 +233,12 @@ void InsetGraphics::edit(LCursor & cur, bool)
 }
 
 
-void InsetGraphics::metrics(MetricsInfo & mi, Dimension & dim) const
+bool InsetGraphics::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        graphic_->metrics(mi, dim);
+       bool const changed = dim_ != dim;
        dim_ = dim;
+       return changed;
 }
 
 
@@ -501,9 +502,9 @@ copyToDirIfNeeded(DocFileName const & file, string const & dir)
                string::size_type const ext_len = file_in.length() - base.length();
                mangled[mangled.length() - ext_len] = '.';
        }
-       string const file_out = support::makeAbsPath(mangled, dir);
+       FileName const file_out(support::makeAbsPath(mangled, dir));
 
-       return copyFileIfNeeded(file, FileName(file_out));
+       return copyFileIfNeeded(file, file_out);
 }