]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetInclude.cpp
#7379 avoid the wrap spell check question when buffer is empty
[lyx.git] / src / insets / InsetInclude.cpp
index 7d16f1ffc4637f5d5b752aa82059e00a409acd2f..d62f4ccb6ed29c231082db811aaa40c60eb371df 100644 (file)
@@ -555,8 +555,14 @@ void InsetInclude::latex(otexstream & os, OutputParams const & runparams) const
                // try to load it so we can write the associated latex
                
                Buffer * tmp = loadIfNeeded();
-               if (!tmp)
+               if (!tmp) {
+                       docstring text = bformat(_("Could not load included "
+                               "file\n`%1$s'\n"
+                               "Please, check whether it actually exists."),
+                               included_file.displayName());
+                       Alert::warning(_("Missing included file"), text);
                        return;
+               }
 
                if (tmp->params().baseClass() != masterBuffer->params().baseClass()) {
                        // FIXME UNICODE