mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-29 05:01:49 +00:00
Amend 28e8bf742
.
The default 'empty' layout has "UNDEFINED" for the LabelString.
This commit is contained in:
parent
dc8d2d554f
commit
1bc5453cab
@ -118,10 +118,18 @@ docstring const InsetBranch::buttonLabel(BufferView const &) const
|
|||||||
if (decoration() == InsetDecoration::MINIMALISTIC)
|
if (decoration() == InsetDecoration::MINIMALISTIC)
|
||||||
return symb + inv_symb + params_.branch;
|
return symb + inv_symb + params_.branch;
|
||||||
|
|
||||||
InsetLayout const & il = getLayout();
|
if (!buffer_) {
|
||||||
docstring const & label_string = il.labelstring();
|
return symb + inv_symb + _("Branch (undefined): ")
|
||||||
if (!label_string.empty())
|
+ params_.branch;
|
||||||
return symb + inv_symb + label_string;
|
}
|
||||||
|
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;
|
docstring s;
|
||||||
if (inmaster && inchild)
|
if (inmaster && inchild)
|
||||||
s = _("Branch: ");
|
s = _("Branch: ");
|
||||||
|
Loading…
Reference in New Issue
Block a user