]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetGraphics.cpp
Embedding: add a check box to InsetGraphic and show/change embedding status
[features.git] / src / insets / InsetGraphics.cpp
index e979e24e2f8303ff9409e231324dc966c1c6e2dd..b75fc82def1a429b6eb50ca04797f0b6694c981b 100644 (file)
@@ -243,13 +243,11 @@ void InsetGraphics::updateEmbeddedFile(Buffer const & buf,
        EmbeddedFile const & file)
 {
        BOOST_ASSERT(buf.embeddedFiles().enabled());
-       LYXERR(Debug::FILES) << "Update InsetGraphics file from " 
-               << params_.filename.toFilesystemEncoding() << std::endl;
-       params_.filename.set(file.availableFile(&buf), buf.filePath());
-       LYXERR(Debug::FILES) << " to " 
-               << params_.filename.toFilesystemEncoding() << std::endl;
-       // FIXME: graphics dialog is not updated even if the underlying
-       // filename is updated. What should I do?
+       params_.filename = file;
+       LYXERR(Debug::FILES) << "Update InsetGraphic with File " 
+               << params_.filename.toFilesystemEncoding() 
+               << ", embedding status: "
+               << params_.filename.embedded() << std::endl;
 }
 
 
@@ -305,7 +303,7 @@ void InsetGraphics::read(Buffer const & buf, Lexer & lex)
                if (it != buf.embeddedFiles().end())
                        // using available file, embedded or external, depending on file availability and
                        // embedding status.
-                       params_.filename = DocFileName(it->availableFile(&buf));
+                       params_.filename = *it;
        }
        graphic_->update(params().as_grfxParams());
 }