]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetWrap.cpp
Cosmetics.
[lyx.git] / src / insets / InsetWrap.cpp
index 91d0808de880594ba1a2d1786c5d0f2742f7a7ed..8fcadf9458b71e12a0bf85a4adb5c8622fae2495 100644 (file)
@@ -39,10 +39,10 @@ using namespace std;
 namespace lyx {
 
 
-InsetWrap::InsetWrap(BufferParams const & bp, string const & type)
-       : InsetCollapsable(bp), name_(from_utf8(type))
+InsetWrap::InsetWrap(Buffer const & buf, string const & type)
+       : InsetCollapsable(buf), name_(from_utf8(type))
 {
-       setLabel(_("wrap: ") + floatName(type, bp));
+       setLabel(_("wrap: ") + floatName(type, buf.params()));
        params_.type = type;
        params_.lines = 0;
        params_.placement = "o";
@@ -107,7 +107,8 @@ bool InsetWrap::getStatus(Cursor & cur, FuncRequest const & cmd,
 
 void InsetWrap::updateLabels(ParIterator const & it)
 {
-       Counters & cnts = buffer().params().textClass().counters();
+       setLabel(_("wrap: ") + floatName(params_.type, buffer().params()));
+       Counters & cnts = buffer().params().documentClass().counters();
        string const saveflt = cnts.current_float();
 
        // Tell to captions what the current float is
@@ -199,12 +200,6 @@ void InsetWrap::validate(LaTeXFeatures & features) const
 }
 
 
-Inset * InsetWrap::clone() const
-{
-       return new InsetWrap(*this);
-}
-
-
 docstring InsetWrap::editMessage() const
 {
        return _("Opened Wrap Inset");