On Wed, Feb 04, 2004 at 09:50:43AM +0100, Alfredo Braunstein wrote: > Andre Poenitz wrote: > > >> The following patch should fix the crash. The culprit is that > >> insetcollapsable::edit(x,y) should not call insettext::edit(cur,x,y) when > >> opening (the inset was not visible before) but insettext::edit(cur, > >> true). > > > > Hm.. is that a proper fix? > > You tell me.
Put it in and add a "#warning look here". > The fact is that it's kind of dumb to try to acess the insettext's > coordinates when it hasn't been drawn before: the user surely didn't > intended that when clicking (the inset wasn't visible). It seems cleaner to > me not to do it. Right. > Otherwise, we should ascertain that we have coordinates before (i.e. an > update has been called) before calling LyXText::edit(x,y)... ugly. Or put some 'sensible' value there, i.e. LCursor::getPos() or similae > Unrelated1: triple click fails because LyXText::dispatch takes a cur > argument but the 95% of it uses the real cursor. Smells fishy. The mouse stuff is not IU'ed yet. As a first approximation, everybody should use the 'cur' argument, not 'cursor()'. > Unrelated2: MOUSE_PRESS opens a collapsable. MOUSE_RELEASE closes it. Guess > the outcome. No need to guess. I've seen it yesterday evening. I was, however, happy not to see it crash ;-) Andre'