Skip to content

Commit

Permalink
Use default wrap mode i.e., QTextOption::WrapAtWordBoundaryOrAnywhere (
Browse files Browse the repository at this point in the history
…#11133)

Do not use QTextOption::WordWrap
With QTextOption::WrapAtWordBoundaryOrAnywhere, if possible, wrapping occurs at a word boundary; otherwise it will occur at the appropriate point on the line, even in the middle of a word.

Fixes #9808 and fixes #11118
  • Loading branch information
adeas31 committed Sep 7, 2023
1 parent d8fb273 commit 682fa8b
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion OMEdit/OMEditLIB/Modeling/ItemDelegate.cpp
Expand Up @@ -68,7 +68,6 @@ QString ItemDelegate::formatDisplayText(QVariant variant) const
void ItemDelegate::initTextDocument(QTextDocument *pTextDocument, QFont font, int width) const
{
QTextOption textOption = pTextDocument->defaultTextOption();
textOption.setWrapMode(QTextOption::WordWrap);
pTextDocument->setDefaultTextOption(textOption);
pTextDocument->setDefaultFont(font);
pTextDocument->setTextWidth(width);
Expand Down

0 comments on commit 682fa8b

Please sign in to comment.