]> 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>
Tue, 20 Feb 2018 14:02:35 +0000 (15:02 +0100)
commita2e1021aba81371b29bf6a61d184383cffda7f9d
treec578f66894563a14f26537584d7a580e124cfbb5
parent2136af92b5b64f4488e765f52bf5a41d27106e9c
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.

(cherry picked from commit a25b48f86cdde98bbd5f8ece06c6bf2f12ee84db)
src/TextMetrics.cpp
status.23x