]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetGraphics.cpp
Embedding: update related insets when the embedding status of a fileitem is changed
[features.git] / src / insets / InsetGraphics.cpp
index 70cfe9767d719a3d35a8a24788fe9cca231b2310..e979e24e2f8303ff9409e231324dc966c1c6e2dd 100644 (file)
@@ -239,6 +239,20 @@ void InsetGraphics::registerEmbeddedFiles(Buffer const &,
 }
 
 
+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?
+}
+
+
 void InsetGraphics::edit(Cursor & cur, bool)
 {
        InsetGraphicsMailer(*this).showDialog(&cur.bv());