aboutsummaryrefslogtreecommitdiffhomepage
path: root/qt/ScintillaEditBase/PlatQt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt/ScintillaEditBase/PlatQt.cpp')
-rw-r--r--qt/ScintillaEditBase/PlatQt.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/qt/ScintillaEditBase/PlatQt.cpp b/qt/ScintillaEditBase/PlatQt.cpp
index 1b8f75c02..ce6f0313b 100644
--- a/qt/ScintillaEditBase/PlatQt.cpp
+++ b/qt/ScintillaEditBase/PlatQt.cpp
@@ -470,7 +470,7 @@ void SurfaceImpl::DrawTextClipped(PRectangle rc,
{
SetClip(rc);
DrawTextNoClip(rc, font, ybase, text, fore, back);
- GetPainter()->setClipping(false);
+ PopClip();
}
void SurfaceImpl::DrawTextTransparent(PRectangle rc,
@@ -489,9 +489,15 @@ void SurfaceImpl::DrawTextTransparent(PRectangle rc,
void SurfaceImpl::SetClip(PRectangle rc)
{
+ GetPainter()->save();
GetPainter()->setClipRect(QRectFFromPRect(rc));
}
+void SurfaceImpl::PopClip()
+{
+ GetPainter()->restore();
+}
+
void SurfaceImpl::MeasureWidths(const Font *font,
std::string_view text,
XYPOSITION *positions)