]> git.lyx.org Git - features.git/commit
Allow breaking a row element at a leading/trailing space
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Tue, 19 Jan 2016 11:02:43 +0000 (12:02 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 4 Feb 2016 07:45:27 +0000 (08:45 +0100)
commit31471496fd53b20b684173da56ba59d0da7f90fc
tree3b8700e00b5e824aa0f015fb162d22874b9b485a
parentaf966e1ee3c908d83a346abc16148595092c56c3
Allow breaking a row element at a leading/trailing space

When an inset is separated from the adjacent string by a space, it is
reasonable to be able to break the string after the space.
Unfortunately, QTextLayout does not do that.

This patch reverts the workaround inserted in 71378268 and replaces it
with a different trick: the string is enlosed between a pair of
zero-width non breaking space characters, so that the leading/trailing
spaces are now normal spaces, where QTextLayout will agree to break
the string.

    Fixes bug #9921 for good.
src/Row.cpp
src/frontends/qt4/GuiFontMetrics.cpp