mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Fix ticket #9276: Labeling cursor off by several characters
The length of STRING row elements is not updated until finalizeLast() is called.
This commit is contained in:
parent
db2044dc14
commit
d605048b5c
@ -849,6 +849,8 @@ void TextMetrics::breakRow(Row & row, int const right_margin, pit_type const pit
|
||||
// before body_pos. Instead, insert some spacing to
|
||||
// align text
|
||||
FontMetrics const & fm = theFontMetrics(text_->labelFont(par));
|
||||
// this is needed to make sure that the row width is correct
|
||||
row.finalizeLast();
|
||||
int const add = max(fm.width(par.layout().labelsep),
|
||||
labelEnd(pit) - row.width());
|
||||
row.addSpace(i, add, *fi, par.lookupChange(i));
|
||||
|
Loading…
Reference in New Issue
Block a user