]> git.lyx.org Git - features.git/commit
Use parMetrics to access the par_metrics_ map
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 12 Feb 2018 16:11:09 +0000 (17:11 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 12 Feb 2018 16:11:09 +0000 (17:11 +0100)
commita25b48f86cdde98bbd5f8ece06c6bf2f12ee84db
tree3492e283afdda9f089be0f371213fd5ee2a70e13
parent24fd7d2bac4db276992de1f736ad3a3ecc1647b8
Use parMetrics to access the par_metrics_ map

In cursorY, it is dangerous to access par_petrics_[0], since one does
not know whether metrics have been computed for this paragraph (which
may be off-screen).

It is safer to use parMetrics(0), that will compute the paragraph
metrics as needed.

Fixes bug #8120.
src/TextMetrics.cpp