now that drawSelection is separated from draw and called before it, the background painting of colored insets overwrites the selection.
A possible way of solving this is to draw the background in InsetText::drawSelection instead of InsetText::draw (need to change LyXText::drawSelection a little bit to work without knowing the background color) Would this be acceptable? Alfredo