Le 22/02/2017 à 14:59, Jean-Marc Lasgouttes a écrit :
Le 18/02/2017 à 23:05, Guillaume Munch a écrit :
commit 71623b88b2c613dd4ab826a9783a53e840bcd6e1
Author: Guillaume Munch <g...@lyx.org>
Date: Sat Feb 18 19:12:55 2017 +0100
Generalise the deletion protection mechanism from math to text
(#9540)
Now backspace and delete in text will select non-empty math and
text insets
before deleting them. This is consistent with what happens in math
already.
This is implemented for InsetText as well but can be disabled in
case of
negative feedback.
This can be set for any sort of inset with the new virtual method
Inset::confirmDeletion.
I like it in theory (we'll see for the practice). It would have been
nice to implement this as much as possible at generic level
(BUfferView::dispatch) so that math and text really behave identically.
I am not sure to understand your suggestion. Insets are supposed to be
able to customize LFUN_*_DELETE_* in whichever way they want. How would
you make this mechanism general without introducing assumptions on how
it has to be implemented?
I do not see confirmDeletion implemented there and I do not see a
special handling for empty insets.
The checks notion of empty inset is implemented in the
Inset::confirmDeletion themselves.
Thanks for the feedback.
Guillaume