]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetInclude.cpp
Allow listing the lyx file itself, fix bug 3707
[lyx.git] / src / insets / InsetInclude.cpp
index 968fa82e489becad97c56970122a0d51e168f3a7..eca2ff60cd9eafb193c5f1f19101e859b1db2370 100644 (file)
@@ -161,7 +161,8 @@ void InsetInclude::doDispatch(Cursor & cur, FuncRequest & cmd)
                break;
 
        case LFUN_MOUSE_RELEASE:
-               InsetIncludeMailer(*this).showDialog(&cur.bv());
+               if (!cur.selection()) 
+                       InsetIncludeMailer(*this).showDialog(&cur.bv());
                break;
 
        default:
@@ -415,7 +416,7 @@ int InsetInclude::latex(Buffer const & buffer, odocstream & os,
        //FIXME RECURSIVE INCLUDE
        //This isn't sufficient, as the inclusion could be downstream.
        //But it'll have to do for now.
-       if (buffer.fileName() == included_file.toFilesystemEncoding()) {
+       if (!isListings(params_) && buffer.fileName() == included_file.toFilesystemEncoding()) {
                Alert::error(_("Recursive input"), 
                               bformat(_("Attempted to include file %1$s in itself! "
                               "Ignoring inclusion."), from_utf8(incfile)));