]> git.lyx.org Git - lyx.git/commitdiff
Fix http://bugzilla.lyx.org/show_bug.cgi?id=5369
authorAbdelrazak Younes <younes@lyx.org>
Fri, 17 Oct 2008 04:35:08 +0000 (04:35 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 17 Oct 2008 04:35:08 +0000 (04:35 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26930 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetCollapsable.cpp
src/insets/InsetERT.cpp
src/insets/InsetERT.h

index a7939033c39ac541dd26719d7628b3cbb5fbd7cd..4898558cce2fd538469137f34aefb400623713ab 100644 (file)
@@ -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
index fd06239b1dd231dd04b8a92214d8d5c91246235a..023cb6abf4d53a55916f39c008280293bc63b562 100644 (file)
@@ -175,13 +175,6 @@ bool InsetERT::insetAllowed(InsetCode /* code */) const
 }
 
 
-void InsetERT::draw(PainterInfo & pi, int x, int y) const
-{
-       const_cast<InsetERT &>(*this).setButtonLabel();
-       InsetCollapsable::draw(pi, x, y);
-}
-
-
 bool InsetERT::showInsetDialog(BufferView * bv) const
 {
        bv->showDialog("ert", params2string(status()), 
index 82afa62cee35af76091b0a9d5e7c3e23f59eb733..968b5fa5a2be776bdca1e3810f6b63d0dd9d86a1 100644 (file)
@@ -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; }