>Hmmm. and where is LFUN_INSET_APPLY currently handled? It certainly >isn't in LyXText::dispatch and it does exist somewhere... > >Ok, got it. It's in BufferView_pimpl.C. > >Martin, I note that your patch doesn't delete this copy of the LFUN >handler. If you're going to add it to LyxText::dispatch you should >remove it from BufferView::Pimpl::dispatch shouldn't you? > >In fact, what is wrong with the current code in >BufferView::Pimpl::dispatch? > > case LFUN_INSET_APPLY: { > string const name = ev.getArg(0); > > InsetBase * inset = owner_->getDialogs().getOpenInset(name); > if (inset) { > // This works both for 'original' and 'mathed' insets. > // Note that the localDispatch performs update also. > FuncRequest fr(bv_, LFUN_INSET_MODIFY, ev.argument); > inset->dispatch(fr); > } else { > FuncRequest fr(bv_, LFUN_INSET_INSERT, ev.argument); > dispatch(fr); > } > } > break; > > case LFUN_INSET_INSERT: { > InsetOld * inset = createInset(ev); > if (!inset || !insertInset(inset)) > delete inset; > break; > }
It doesn't get called, that's what's wrong with it. What implications does deleting the above code from BufferView::Pimpl::dispatch have? I haven't tried it. - Martin