On Wed, Mar 12, 2008 at 09:23:59PM +0100, Edwin Leuven wrote:
> i am trying to get some row selection code working in insettabular, but am 
> baffled by this cursor business
>
> the scenario is the following:
>
> the cursor is outside the tabular
>
> at the moment, on mouse press, i check in front of what row i click
>
> this i do in InsetTabular::doDispatch
>
> now i want to select row r
>
> i tried this with the following code
>
> cur.bv().cursor().anchor_.idx() = tabular.getFirstCellInRow(r);
> cur.idx() = tabular.getLastCellInRow(r);
> cur.selection() = true;
> cur.pit() = 0;
> cur.pos() = 0;
>
> but this doesn't work

Sometimes the  cur passed down to InsetFoo::doDispatch() is thrown away...
Look at the code in Cursor::dispatch()

Andre'

Reply via email to