On Tuesday 23 January 2001 12:43, Dekel Tsur wrote:
> > Dekel, will this have been fixed by your recent patch? Perhaps you'd 
> > care to comment?

> Don't try to blame me. It is your fault.

Hey, hey, hey! I blamed nobody! So, I'll start now by saying, "It's all my 
fault. Everything is my fault. O me miserum!" That should cover most 
eventualities :o)

> The problem is that when a label is selected in the browser, we call to
> Dispatch(LFUN_REF_BACK) (in FormRef::input). I guess the idea is to return
> you to the original position from which the browser was opened, so the
> reference will be inserted there. However, if there are previously saved
> positions (i.e. you open the dialog, press "goto reference" and closed the
> dialog without pressing "go back"), the cursor will move to the last save
> positions, which can be in a different buffer, and the buffer switching
> causes the closing of the dialog.

Well this is certainly wrong. There should be nothing saved when the popup is 
closed. (Incidentally, what DID you change recently; I'm vaguely aware that 
you fixed something but have been busy elsewhere and not really paying 
attention.)

> It is not hard to fix this problem, but I want to discuss what is the
> behavior that we want for the dialog. Here are three suggestions
> 
> 1. The cursor is moved only when explicitly pressing goto reference/go back.
> 
> 2. Pressing a label in the browser doesn't move the cursor. However, when 
you
> press OK/Apply, the cursor is moved to the original position (i.e. the
> position from which the dialog was opened), and the reference is inserted
> there.
> 
> 3. Pressing a label in the browser automatically moves you to the label,
> (without the need to press "goto reference"). Again, pressing OK/Apply
> returns you to the original position.
> 
> I think that 3 is the best option.

Me, I like 1 best. But we'll still run into problems when navigating between 
labels if the labels are in different buffers. Ideally, the popup should know 
whether the buffers are related (share a common parent). If they do, stay 
open, if not close. That sounds excessively complex. Why don't I override 
UpdateSlot to:

void FormRef::updateSlot(bool switched)
{
                 update();
}

Will that be sufficient?
Angus


Reply via email to