18/06/2014 16:38, Richard Heck:
JMarc is the one who knows about selection, so he'll have more to say
than I do. But a
couple quick thoughts. The first is that I don't myself understand when
we should call
selHandle() and when we should call setSelection(). That makes me unsure
whether
the first part of your patch is correct.

selHandle is a helper function that allows to ensure that the selection is in the correct state. It allows to make the persistent mark work, in particular.

That said, looking through InsetTabular::doDispatch, for example, I note
that we very
often call setSelection(true), which skips the test in the code you just
quoted. Simply
changing that to setSelection() is going to fix most of these problems.
Indeed, I kind of
suspect that calling setSelection(true) is always wrong, since it always
skips that test.

Yes. I would propose to get rid of setSelection(bool) (replace it with selection_ == bool in Cursor.cpp) and to use better functions elsewhere.

JMarc

Reply via email to