Fix bug 5407

http://bugzilla.lyx.org/show_bug.cgi?id=5407

This patch makes insetfloat search its styles using "Float:<floatname>" (or
"Float" if this fails). This allows to define a default behaviour for new
floats that makes sense.



git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@27266 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jean-Marc Lasgouttes 2008-11-05 15:35:02 +00:00
parent def9ca797c
commit 0e2ded8161
4 changed files with 8 additions and 29 deletions

View File

@ -169,11 +169,3 @@ Float
LaTeXBuiltin false
End
InsetLayout tableau
LabelString Tableau
LabelFont
Color collapsable
Size Small
EndFont
MultiPar true
End

View File

@ -228,26 +228,7 @@ InsetLayout Box:Shaded
MultiPar true
End
InsetLayout figure
LabelString Figure
LabelFont
Color collapsable
Size Small
EndFont
MultiPar true
End
InsetLayout table
LabelString Table
LabelFont
Color collapsable
Size Small
EndFont
MultiPar true
End
InsetLayout algorithm
LabelString Algorithm
InsetLayout Float
LabelFont
Color collapsable
Size Small

View File

@ -127,6 +127,12 @@ InsetFloat::~InsetFloat()
}
docstring InsetFloat::name() const
{
return "Float:" + name_;
}
docstring InsetFloat::toolTip(BufferView const & bv, int x, int y) const
{
if (InsetCollapsable::toolTip(bv, x, y).empty() || isOpen())

View File

@ -71,7 +71,7 @@ public:
InsetFloatParams const & params() const { return params_; }
private:
///
docstring name() const { return name_; }
docstring name() const;
///
docstring toolTip(BufferView const & bv, int x, int y) const;
///