Angus Leeming wrote:

> No. LFUNs should be handled by the appropriate dispatch function.
> Martin's move of LFUN_INSET_APPLY, LFUN_INSET_INSERT from BufferView
> to LyXText was the right thing to do because these LFUNs aren't
> anything to do with the BufferView.

Ah, thanks. 

> Kayvan's reported problem, that a mouse click doesn't get translated
> to a command to open up the paragraph settings dialog is a problem
> with an LFUN that IMO does indeed belong to BufferView::dispatch.

I think it's not a mouse click, but Edit->Paragraphs settings from the
menus. Maybe also this one should be moved to LyXText? (it's related to the
cursor position after all)
Is there a good rule about what should be handled where? For instance, why
change tracking & thesaurus but not s&r, etc)?

>> If I understand correctly, BufferView::dispatch gets never called,
>> and this is the reason we get a lot of unhandled lfuns.
>> 
>> Wouldn't a solution like this (call the bv distatch at the end of
>> the dispatch line) be more appropriate instead?
> 
> Yes.

Should I apply this bit? Will make life easier to those people using
1.4.0cvs (change tracking, goto bookmark, goto ref etc are also handled in
BufferView::dispatch...) ;-)

Alternatively, we can call bv::dispatch from LyXFunc dispatch, right after
calling LCursor::dispatch. Or call directly bv::dispatch from lyxfunc
(instead of LCursor), and in bv::dispatch call LCursor::dispatch as a very
first thing. But I'm disgressing...

Alfredo




Reply via email to