Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
9bef75f8
Commit
9bef75f8
authored
Oct 01, 2009
by
mae
Browse files
fixed repaint issue with collapse-popups
parent
d50cc220
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/plugins/texteditor/basetexteditor.cpp
View file @
9bef75f8
...
...
@@ -2293,13 +2293,13 @@ void BaseTextEditor::paintEvent(QPaintEvent *e)
qreal
blockHeight
=
0
;
QTextBlock
b
=
visibleCollapsedBlock
;
while
(
!
b
.
isVisible
()
&&
visibleCollapsedBlockOffset
.
y
()
+
blockHeight
<=
e
->
rect
().
bottom
()
)
{
while
(
!
b
.
isVisible
())
{
b
.
setVisible
(
true
);
// make sure block bounding rect works
QRectF
r
=
blockBoundingRect
(
b
).
translated
(
visibleCollapsedBlockOffset
);
QTextLayout
*
layout
=
b
.
layout
();
for
(
int
i
=
layout
->
lineCount
()
-
1
;
i
>=
0
;
--
i
)
maxWidth
=
qMax
(
maxWidth
,
layout
->
lineAt
(
i
).
naturalTextWidth
()
+
margin
);
maxWidth
=
qMax
(
maxWidth
,
layout
->
lineAt
(
i
).
naturalTextWidth
()
+
2
*
margin
);
blockHeight
+=
r
.
height
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment