]> git.lyx.org Git - features.git/commitdiff
Make logic clearer, with help from Lars.
authorRichard Heck <rgheck@comcast.net>
Sat, 26 May 2007 17:26:58 +0000 (17:26 +0000)
committerRichard Heck <rgheck@comcast.net>
Sat, 26 May 2007 17:26:58 +0000 (17:26 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18523 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetInclude.cpp

index 02810cb2c3730c4fd7b88ede3247d769b9cec4ed..e8eb7adefecf4eabff86b3bfb50b49d911638060 100644 (file)
@@ -462,12 +462,12 @@ int InsetInclude::latex(Buffer const & buffer, odocstream & os,
        LYXERR(Debug::LATEX) << "exportfile:" << exportfile << endl;
        LYXERR(Debug::LATEX) << "writefile:" << writefile << endl;
 
-       if (runparams.inComment || runparams.dryrun)
-               // Don't try to load or copy the file
-               ;
-       //if it's a LyX file and we're including or inputting it...
-       else if (isInputOrInclude(params_) && 
+       if (runparams.inComment || runparams.dryrun) {
+               //Don't try to load or copy the file if we're
+               //in a comment or doing a dryrun
+       } else if (isInputOrInclude(params_) && 
                 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, params_))
                        return false;
@@ -503,9 +503,10 @@ int InsetInclude::latex(Buffer const & buffer, odocstream & os,
                                   runparams, false);
                runparams.encoding = oldEnc;
        } else {
-               // Copy the file to the temp dir, so that .aux files etc.
-               // are not created in the original dir. Files included by
-               // this file will be found via input@path, see ../Buffer.cpp.
+               // In this case, it's not a LyX file, so we copy the file
+               // to the temp dir, so that .aux files etc. are not created 
+               // in the original dir. Files included by this file will be 
+               // found via input@path, see ../Buffer.cpp.
                unsigned long const checksum_in  = sum(included_file);
                unsigned long const checksum_out = sum(writefile);