diff options
Diffstat (limited to 'dw/textblock.cc')
-rw-r--r-- | dw/textblock.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/dw/textblock.cc b/dw/textblock.cc index 77672449..1dbe3ab7 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -3193,7 +3193,13 @@ int Textblock::getGeneratorX (int oofmIndex) int Textblock::getGeneratorWidth () { - return lineBreakWidth; + // Cf. sizeRequestImpl. + if (mustBeWidenedToAvailWidth ()) + return lineBreakWidth; + else { + int w = lines->size () > 0 ? lines->getLastRef()->maxLineWidth : 0; + return min (w + leftInnerPadding + boxDiffWidth (), lineBreakWidth); + } } bool Textblock::isPossibleContainer (int oofmIndex) |