Revision | 2271d2b3336e0976d6c00d54c09ff006474e7c18 (tree) |
---|---|
Time | 2021-01-06 19:19:28 |
Author | test <test@yaho...> |
Commiter | test |
WPF版でレタリングが無駄に遅い箇所があった
@@ -174,22 +174,20 @@ namespace FooEditEngine.WPF | ||
174 | 174 | |
175 | 175 | public void DrawOneLine(Document doc, LineToIndexTable lti, int row, double x, double y) |
176 | 176 | { |
177 | - PreDrawOneLineHandler PreDrawOneLine = null; | |
178 | - | |
179 | - if (InputMethod.Current.ImeState == InputMethodState.On) | |
180 | - PreDrawOneLine = this.DrawImeConversionLine; | |
181 | - | |
182 | 177 | base.DrawOneLine(doc, |
183 | 178 | lti, |
184 | 179 | row, |
185 | 180 | x, |
186 | 181 | y, |
187 | - PreDrawOneLine | |
182 | + this.DrawImeConversionLine | |
188 | 183 | ); |
189 | 184 | } |
190 | 185 | |
191 | 186 | private void DrawImeConversionLine(MyTextLayout layout, LineToIndexTable lti, int row, double x, double y) |
192 | 187 | { |
188 | + if (InputMethod.Current.ImeState != InputMethodState.On) | |
189 | + return; | |
190 | + | |
193 | 191 | using (Unlocker locker = this.store.LockDocument(false)) |
194 | 192 | { |
195 | 193 | int lineIndex = lti.GetIndexFromLineNumber(row); |