#include "DispatchResult.h"
#include "FuncRequest.h"
#include "FuncStatus.h"
+#include "Inset.h"
+#include "LaTeXFeatures.h"
#include "Lexer.h"
#include "LyX.h"
#include "output_docbook.h"
if (decoration() == InsetDecoration::MINIMALISTIC)
return symb + inv_symb + params_.branch;
+ if (!buffer_) {
+ return symb + inv_symb + _("Branch (undefined): ")
+ + params_.branch;
+ }
+ bool const has_layout =
+ buffer().params().documentClass().hasInsetLayout(layoutName());
+ if (has_layout) {
+ InsetLayout const & il = getLayout();
+ docstring const & label_string = il.labelstring();
+ if (!label_string.empty())
+ return symb + inv_symb + label_string;
+ }
docstring s;
if (inmaster && inchild)
s = _("Branch: ");
void InsetBranch::validate(LaTeXFeatures & features) const
{
- if (producesOutput())
+ // Showing previews in a disabled branch may require stuff
+ if (producesOutput() || features.runparams().for_preview)
InsetCollapsible::validate(features);
}