From: Abdelrazak Younes Date: Fri, 17 Oct 2008 04:35:08 +0000 (+0000) Subject: Fix http://bugzilla.lyx.org/show_bug.cgi?id=5369 X-Git-Tag: 1.6.10~3012 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=7ec4207371e166fccb8a9eec583bc7fec65efe8e;p=lyx.git Fix http://bugzilla.lyx.org/show_bug.cgi?id=5369 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26930 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index a7939033c3..4898558cce 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -170,8 +170,10 @@ void InsetCollapsable::read(Lexer & lex) // this must be set before we enter InsetText::read() setLayout(buffer().params()); - InsetText::read(lex); + // set button label again as the inset contents was not read yet at + // setLayout() time. + setButtonLabel(); // Force default font, if so requested // This avoids paragraphs in buffer language that would have a diff --git a/src/insets/InsetERT.cpp b/src/insets/InsetERT.cpp index fd06239b1d..023cb6abf4 100644 --- a/src/insets/InsetERT.cpp +++ b/src/insets/InsetERT.cpp @@ -175,13 +175,6 @@ bool InsetERT::insetAllowed(InsetCode /* code */) const } -void InsetERT::draw(PainterInfo & pi, int x, int y) const -{ - const_cast(*this).setButtonLabel(); - InsetCollapsable::draw(pi, x, y); -} - - bool InsetERT::showInsetDialog(BufferView * bv) const { bv->showDialog("ert", params2string(status()), diff --git a/src/insets/InsetERT.h b/src/insets/InsetERT.h index 82afa62cee..968b5fa5a2 100644 --- a/src/insets/InsetERT.h +++ b/src/insets/InsetERT.h @@ -59,8 +59,6 @@ private: /// void validate(LaTeXFeatures &) const {} /// - void draw(PainterInfo & pi, int x, int y) const; - /// bool showInsetDialog(BufferView *) const; /// virtual bool forcePlainLayout(idx_type = 0) const { return true; }