On Tue, Nov 07, 2006 at 03:52:26PM +0100, Abdelrazak Younes wrote: > Abdelrazak Younes wrote: > >Dear Martin, dear all, > > > >While trying to understand how the inset metrics are updated I stumbled > >on this potential problem: > > > >Find all "wide_inset_", Match case, Whole word, Subfolders, Find Results > >1, "lyx-trunk", "*.c;*.cpp;*.cxx;*.cc;*.tli;*.tlh;*.h;*.hpp;*.hxx;*.hh" > > D:\devel\lyx\trunk\src\insets\insettext.h(136): > > bool & Wide() const { return wide_inset_; } > > D:\devel\lyx\trunk\src\insets\insettext.h(159): > > mutable bool wide_inset_; > > Matching lines: 2 Matching files: 1 Total files searched: 968 > > > > > >This means that the wide_inset_ variable is never set. > > Hum... I missed the mutable tag... Ok, it is used in rc\rowpainter.C(888): > > // If this is the only object on the row, we can make it wide > for (pos_type i = rit->pos() ; i != rit->endpos(); ++i) { > InsetBase const * const in = par.getInset(i); > if (in) { > InsetText const * const t = in->asTextInset(); > if (t) > t->Wide() = in_inset_alone_on_row; > } > } > > > I stand corrected but a const method giving non-const reference access a > mutable variable is not very nice.
Putting it mildly... I remember fighting with this, or in fact, with an unrelated bug. And forgot to reverse my change. - Martin
pgpqi20WmJLz7.pgp
Description: PGP signature