Author: forenr
Date: Tue Mar 22 17:46:34 2011
New Revision: 37995
URL: http://www.lyx.org/trac/changeset/37995

Log:
Fix bug #7343 (No warning for missing child documents)

Modified:
   lyx-devel/branches/BRANCH_1_6_X/src/insets/InsetInclude.cpp
   lyx-devel/branches/BRANCH_1_6_X/status.16x

Modified: lyx-devel/branches/BRANCH_1_6_X/src/insets/InsetInclude.cpp
==============================================================================
--- lyx-devel/branches/BRANCH_1_6_X/src/insets/InsetInclude.cpp Tue Mar 22 
17:30:34 2011        (r37994)
+++ lyx-devel/branches/BRANCH_1_6_X/src/insets/InsetInclude.cpp Tue Mar 22 
17:46:34 2011        (r37995)
@@ -511,8 +511,14 @@
                 isLyXFilename(included_file.absFilename())) {
                //if it's a LyX file and we're inputting or including,
                //try to load it so we can write the associated latex
-               if (!loadIfNeeded(buffer()))
+               if (!loadIfNeeded(buffer())) {
+                       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 false;
+               }
 
                Buffer * tmp = theBufferList().getBuffer(included_file);
 

Modified: lyx-devel/branches/BRANCH_1_6_X/status.16x
==============================================================================
--- lyx-devel/branches/BRANCH_1_6_X/status.16x  Tue Mar 22 17:30:34 2011        
(r37994)
+++ lyx-devel/branches/BRANCH_1_6_X/status.16x  Tue Mar 22 17:46:34 2011        
(r37995)
@@ -75,6 +75,8 @@
 
 - Fix broken commits in VCS when message contains quotes (bug 7338).
 
+- Issue a warning when an included file could not be loaded (bug 7343).
+
 
 * DOCUMENTATION AND LOCALIZATION
 

Reply via email to