On 18-Dec-2001 Lars Gullik Bj�nnes wrote:
> Michael Schmitt <[EMAIL PROTECTED]> writes:
> 
>|   #0  LyXText::Selection::set (this=0xa8, s=false) at lyxtext.h:260
>|   #1  0x080f49e1 in LyXText::clearSelection (this=0x0) at text2.C:1059
>|   #2  0x08155df2 in InsetText::insetButtonPress (this=0x855beee8,
>|   bv=0x5fce8fec, x=82, y=-2, button=1) at insettext.C:996
> 
> Seems that the lt (who decided on a non-descriptive name like that?)
> variable is used wrongly.

You got the cause and I already submitted a patch! I have really no
idea who selected such a name lt, hmmm, (l)yx(t)ext, hmm, but really
stupid should probably be

local_cache_for_lyx_text_to_make_sure_it_s_not_deleted_while_inside

hmm yes this seems much better, or perhaps we should just put a comment
on the declaration in insettext.h, but no that would be too easy and we
still would have that nondescriptive name in the code #:O)

> Can someone please tell me what this variable really is used for?
> I must say that this variable in particular makes insettext a lot
> harder to understand.

I is used to be sure that an InsetText::update() call (which can be
called from inside LyXText does not delete the LyXText we're actually
inside. This is needed right now, but I hate it at least as much as you
do, only that I don't see a short time solution for this. We probably
have to rewrite completely how the LyXText is handled inside an InsetText,
but I don't have the time and energy right now for such a move and we should
concentrate on 1.2.0 release anyway!

          Jug

--
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._
Dr. J�rgen Vigna        E-Mail:  [EMAIL PROTECTED]
Italienallee 13/N       Tel/Fax: +39-0471-450260 / +39-0471-450253
I-39100 Bozen           Web:     http://www.sad.it/~jug
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

The water was not fit to drink.  To make it palatable, we had to add whiskey.
By diligent effort, I learned to like it.
                -- Winston Churchill

Reply via email to