summaryrefslogtreecommitdiff
path: root/fpdfsdk/fxedit
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fxedit')
-rw-r--r--fpdfsdk/fxedit/fxet_edit.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/fpdfsdk/fxedit/fxet_edit.cpp b/fpdfsdk/fxedit/fxet_edit.cpp
index 5b84c9b95e..cf4fdc3d91 100644
--- a/fpdfsdk/fxedit/fxet_edit.cpp
+++ b/fpdfsdk/fxedit/fxet_edit.cpp
@@ -681,7 +681,7 @@ void CFX_Edit::DrawEdit(CFX_RenderDevice* pDevice,
CFX_ByteTextBuf sTextBuf;
int32_t nFontIndex = -1;
CFX_PointF ptBT;
- pDevice->SaveState();
+ CFX_RenderDevice::StateRestorer restorer(pDevice);
if (!rcClip.IsEmpty()) {
CFX_FloatRect rcTemp = rcClip;
pUser2Device->TransformRect(rcTemp);
@@ -770,8 +770,6 @@ void CFX_Edit::DrawEdit(CFX_RenderDevice* pDevice,
sTextBuf.MakeString(), crOldFill, nHorzScale);
}
}
-
- pDevice->RestoreState(false);
}
CFX_Edit::CFX_Edit()