]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetInclude.cpp
Context menu for InsetArgument
[lyx.git] / src / insets / InsetInclude.cpp
index 13c4888fb001c7a4cc6c584f6b2b04be7bfee994..2c0c412d04591f706e1f7018e1db6ebfb6fe9f1d 100644 (file)
@@ -624,6 +624,7 @@ void InsetInclude::latex(otexstream & os, OutputParams const & runparams) const
                runparams.master_language = buffer().params().language;
                runparams.par_begin = 0;
                runparams.par_end = tmp->paragraphs().size();
+               runparams.is_child = true;
                if (!tmp->makeLaTeXFile(tmpwritefile, masterFileName(buffer()).
                                onlyPath().absFileName(), runparams, Buffer::OnlyBody)) {
                        docstring msg = bformat(_("Included file `%1$s' "
@@ -639,6 +640,7 @@ void InsetInclude::latex(otexstream & os, OutputParams const & runparams) const
                }
                runparams.encoding = oldEnc;
                runparams.master_language = oldLang;
+               runparams.is_child = false;
 
                // If needed, use converters to produce a latex file from the child
                if (tmpwritefile != writefile) {
@@ -822,6 +824,7 @@ int InsetInclude::plaintext(odocstream & os, OutputParams const & op) const
                return str.size();
        }
        writePlaintextFile(*ibuf, os, op);
+       return 0;
 }
 
 
@@ -931,7 +934,9 @@ void InsetInclude::validate(LaTeXFeatures & features) const
                        // otherwise it would always be the master buffer,
                        // and nested includes would not work.
                        features.setBuffer(*tmp);
+                       features.runparams().is_child = true;
                        tmp->validate(features);
+                       features.runparams().is_child = false;
                        features.setBuffer(buffer());
                }
        }
@@ -1142,6 +1147,8 @@ void InsetInclude::updateCommand()
 
 void InsetInclude::updateBuffer(ParIterator const & it, UpdateType utype)
 {
+       button_.update(screenLabel(), true);
+
        Buffer const * const childbuffer = getChildBuffer();
        if (childbuffer) {
                childbuffer->updateBuffer(Buffer::UpdateChildOnly, utype);