>It is an LFUN that I introduced I think (don't have the sources to
>hand). It is invoked indirectly.
>
>The frontend passes
>        LFUN_INSET_MODIFY "citation" "leeming03"
>to the core.
>
>If we are modifying an existing inset then we grab it. Something like
>(don't have the sources to hand)
>        InsetOld * inset = Dialogs::get_active_inset("ciataion");
>        inset->dispatch(LFUN_INSET_APPLY, "leeming03");
>
>If we are not modifying an existing inset we must first create it.
>        InsetOld * inset = new InsetCitation;
>        inset->dispatch(LFUN_INSET_APPLY, "leeming03");
>        bv->insert(inset);
>
>HTH,
>
>--
>Angus

Looks like just the other way around, in fact:

   1134     case LFUN_INSET_APPLY: {
   1135         string const name = ev.getArg(0);
   1136
   1137 lyxerr << "in BufferView_pimpl LFUN_INSET_APPLY" << std::endl;
   1138         InsetBase * inset = owner_->getDialogs().getOpenInset(name);
   1139         if (inset) {
   1140             // This works both for 'original' and 'mathed' insets.
   1141             // Note that the localDispatch performs update also.
   1142             FuncRequest fr(bv_, LFUN_INSET_MODIFY, ev.argument);
   1143             inset->dispatch(fr);
   1144         } else {
   1145             FuncRequest fr(bv_, LFUN_INSET_INSERT, ev.argument);
   1146             dispatch(fr);
   1147         }
   1148     }
   1149     break;

(the lyxerr statement is my doing)

...but it's not getting there.

- Martin


Reply via email to