aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2013-06-25 15:06:48 +1000
committernyamatongwe <devnull@localhost>2013-06-25 15:06:48 +1000
commitef32912cc53207a3b5ee6c6ce792c65e0620b2ea (patch)
tree704f1cdaf426ef03c615b4e127da89a58731e62b
parent6a5c74c13ed0f564b4f3ff01ecde08cef9d694e0 (diff)
downloadscintilla-mirror-ef32912cc53207a3b5ee6c6ce792c65e0620b2ea.tar.gz
Specify paint device when creating QTextLayout. Fixes mis-layout of text when
QApplication construction delayed. From John Ehresman.
-rw-r--r--qt/ScintillaEditBase/PlatQt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt/ScintillaEditBase/PlatQt.cpp b/qt/ScintillaEditBase/PlatQt.cpp
index 83512ba0b..ba1f197cc 100644
--- a/qt/ScintillaEditBase/PlatQt.cpp
+++ b/qt/ScintillaEditBase/PlatQt.cpp
@@ -460,7 +460,7 @@ void SurfaceImpl::MeasureWidths(Font &font,
return;
SetCodec(font);
QString su = codec->toUnicode(s, len);
- QTextLayout tlay(su, *FontPointer(font));
+ QTextLayout tlay(su, *FontPointer(font), GetPaintDevice());
tlay.beginLayout();
QTextLine tl = tlay.createLine();
tlay.endLayout();