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 flaots that makes sense. José? JMarc
svndiff src/insets/InsetFloat.cpp src/insets/InsetFloat.h lib/layouts/stdinsets.inc Index: src/insets/InsetFloat.cpp =================================================================== --- src/insets/InsetFloat.cpp (revision 27185) +++ src/insets/InsetFloat.cpp (working copy) @@ -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()) Index: src/insets/InsetFloat.h =================================================================== --- src/insets/InsetFloat.h (revision 27185) +++ src/insets/InsetFloat.h (working copy) @@ -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; /// Index: lib/layouts/stdinsets.inc =================================================================== --- lib/layouts/stdinsets.inc (revision 27185) +++ lib/layouts/stdinsets.inc (working copy) @@ -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