On Thu, Nov 13, 2003 at 09:50:30AM +0000, Angus Leeming wrote:
> Martin Vermeer wrote:
> 
> > On Wed, Nov 12, 2003 at 05:10:41PM +0000, Angus Leeming spake
> > thusly:
> > 
> > ...
> > 
> > Progress!
> > 
> > Now I have the attached, and the dialog comes up and if you enter a
> > string there, it becomes the inset name. I.e., the "APPLY: no inset"
> > branch now functions. And not only for label, but for URLs as well.
> > 
> > The "APPLY: we have an inset" branch still fails though.
> > 
> > Still, this is an improvement. I propose to check this in -- unless
> > you have an easy, off-the-cuff proposal to get the MODIFY branch
> > going as well...
> 
> Well done, Martin! (Don't forget to remove the lyxerr messages before 
> you commit the patch ;-)
> 
> The alternative fix would be:
> 
>         case LFUN_INSET_APPLY: {
>                 string const name = cmd.getArg(0);
>                 InsetBase * inset =
>                         bv->owner()->getDialogs().getOpenInset(name);
> 
>                 if (inset) {
>                         FuncRequest fr(bv, LFUN_INSET_MODIFY, name);
>                         inset->dispatch(fr);
>                 } else {
>                         FuncRequest cmd2 = cmd;
>                         cmd2.action = LFUN_INSET_INSERT;
>                         dispatch(cmd2);
>                 }

Is that else-branch equivalent to

                 } else {
                    doInsertInset(this, cmd, true, false);
                 }
                 break;

?

Andre'

-- 
Those who desire to give up Freedom in order to gain Security, will not have,
nor do they deserve, either one.     (T. Jefferson or B. Franklin or both...)

Reply via email to