On 17-Jan-2002 John Levon wrote:
> On Thu, Jan 17, 2002 at 09:34:52AM +0100, Juergen Vigna wrote:
> 
>> Sorry John all are waiting for my reply but I'm just too busy! Well IMO
> 
> OK sorry :)
> 
>> could be wrong thought. Could you tell me what problems you have exactly?
>> Step by step so that I can follow it and backtrace the problem?
> 
> Well, in LFUN_GOTOPARAGRAPH we have :
> 
>       Paragraph * par = owner->buffer()->getParFromID(id);
>       owner->view()->text->setCursor(owner->view(), par, 0);
> 
> So from the given ID, we need to set the cursor in the par, and open
> the insets etc. This you know.

Ok the code above is plainly wrong IMO. I'll try to fix it up. We have
to test first if the found paragraph is inside an inset, if no just proceed
with the call we have there, if yes we have to unlock an eventually locked
inset and then call the edit() call of the inset to lock. If we want we
could put that code into BufferView::lockInset()

if (theLockingInset() && !theLockingInset()->getParFromID(id))
   unlockInset(theLockingInset());

And then proceed with the locking of the right inset, but then we would
also have to fix UpdataableInset::lockInsetInInset() with the same stuff
as the above

if (the_locking_inset() && !the_locking_inset()->getParFromID(id)) {
                the_locking_inset->insetUnlock(bv);
                the_locking_inset = 0;
}

There is also a small problem in BufferView::lockInset() I've just seen
and that is that Inset::edit() is not called and it should be called if
the requesting inset was inside another inset so the outer inset has to
be :edit'ed. Well I'm working on it now so let's see what I can do ;)

          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
-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._-._

Jenkinson's Law:
        It won't work.

Reply via email to