Boost logo

Boost :

From: Angus Leeming (angus.leeming_at_[hidden])
Date: 2004-03-22 05:28:51

This from BufferView::Pimpl::workAreaDispatch:
    // Try to dispatch to an non-editable inset near this position
    DispatchResult res;
    if (inset)
        inset->dispatch(cur, cmd);

    // Dispatch to the temp cursor.
    // An inset (or LyXText) can assign this to bv->cursor()
    // if it wishes to do so.
    if (!res.dispatched())
        res = cur.dispatch(cmd);

I think that the code is a relic of the (not so distant) days when
Inset::dispatch returned a DispatchResult rather than void. Should it
not be rewritten as:

    if (inset)
        inset->dispatch(cur, cmd);
    DispatchResult const res = cur.dispatch(cmd);

Or even as:

    DispatchResult const res = cur.dispatch(cmd);

? It seems to me that the cursor is now responsible for initiating the
dispatch to the correct inset.

Help! ;-)


Boost list run by bdawes at, gregod at, cpdaniel at, john at