OSDN Git Service

WPF版でレタリングが無駄に遅い箇所があった
[fooeditengine/FooEditEngine.git] / WPF / FooEditEngine / Direct2D / D2DRender.cs
index e12f559..422e806 100644 (file)
@@ -174,22 +174,20 @@ namespace FooEditEngine.WPF
 
         public void DrawOneLine(Document doc, LineToIndexTable lti, int row, double x, double y)
         {
-            PreDrawOneLineHandler PreDrawOneLine = null;
-
-            if (InputMethod.Current.ImeState == InputMethodState.On)
-                PreDrawOneLine = this.DrawImeConversionLine;
-
             base.DrawOneLine(doc,
                 lti,
                 row,
                 x,
                 y,
-                PreDrawOneLine
+                this.DrawImeConversionLine
                 );
         }
 
         private void DrawImeConversionLine(MyTextLayout layout, LineToIndexTable lti, int row, double x, double y)
         {
+            if (InputMethod.Current.ImeState != InputMethodState.On)
+                return;
+
             using (Unlocker locker = this.store.LockDocument(false))
             {
                 int lineIndex = lti.GetIndexFromLineNumber(row);