mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
one less explicit test against FLEX_CODE
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30543 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
58182c5860
commit
9d857249b0
@ -875,17 +875,7 @@ docstring InsetCollapsable::floatName(string const & type) const
|
||||
InsetLayout::InsetDecoration InsetCollapsable::decoration() const
|
||||
{
|
||||
InsetLayout::InsetDecoration const dec = getLayout().decoration();
|
||||
switch (dec) {
|
||||
case InsetLayout::CLASSIC:
|
||||
case InsetLayout::MINIMALISTIC:
|
||||
case InsetLayout::CONGLOMERATE:
|
||||
return dec;
|
||||
case InsetLayout::DEFAULT:
|
||||
break;
|
||||
}
|
||||
if (lyxCode() == FLEX_CODE)
|
||||
return InsetLayout::CONGLOMERATE;
|
||||
return InsetLayout::CLASSIC;
|
||||
return dec == InsetLayout::DEFAULT ? InsetLayout::CLASSIC : dec;
|
||||
}
|
||||
|
||||
|
||||
|
@ -41,6 +41,13 @@ InsetFlex::InsetFlex(InsetFlex const & in)
|
||||
{}
|
||||
|
||||
|
||||
InsetLayout::InsetDecoration InsetFlex::decoration() const
|
||||
{
|
||||
InsetLayout::InsetDecoration const dec = getLayout().decoration();
|
||||
return dec == InsetLayout::DEFAULT ? InsetLayout::CONGLOMERATE : dec;
|
||||
}
|
||||
|
||||
|
||||
docstring InsetFlex::editMessage() const
|
||||
{
|
||||
return _("Opened Flex Inset");
|
||||
|
@ -30,6 +30,8 @@ public:
|
||||
docstring editMessage() const;
|
||||
///
|
||||
InsetCode lyxCode() const { return FLEX_CODE; }
|
||||
/// Default looks
|
||||
InsetLayout::InsetDecoration decoration() const;
|
||||
///
|
||||
void write(std::ostream &) const;
|
||||
/// should paragraph indendation be ommitted in any case?
|
||||
|
Loading…
Reference in New Issue
Block a user