]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetInclude.cpp
Replace home made temp file creation with safer (and cleaner) Qt' solution. Should...
[lyx.git] / src / insets / InsetInclude.cpp
index d976556a02cd4af8ce05017554b770a1e82e187d..38e61ae59e63a3c8f5da3342e163c5595caec14c 100644 (file)
@@ -185,28 +185,6 @@ InsetInclude::InsetInclude(InsetInclude const & other)
 InsetInclude::~InsetInclude()
 {
        delete label_;
-       if (isVerbatim(params()) || isListings(params()))
-               return;
-
-
-       string const parent_filename = buffer().absFileName();
-       FileName const included_file = makeAbsPath(to_utf8(params()["filename"]),
-                          onlyPath(parent_filename));
-
-       if (!isLyXFilename(included_file.absFilename()))
-               return;
-
-       Buffer * child = theBufferList().getBuffer(included_file.absFilename());
-       // File not opened, nothing to close.
-       if (!child)
-               return;
-
-       // Child document has a different parent, don't close it.
-       if (child->parent() != &buffer())
-               return;
-
-       //close the buffer.
-       theBufferList().release(child);
 }