OSDN Git Service

読み込み時にたまに落ちるバグを修正した
authorkonekoneko <test2214@hotmail.co.jp>
Thu, 20 Oct 2016 11:08:40 +0000 (16:38 +0530)
committerkonekoneko <test2214@hotmail.co.jp>
Thu, 20 Oct 2016 11:08:40 +0000 (16:38 +0530)
Core/Document.cs
Core/StringBuffer.cs
UWP/FooEditEngine.UWP/FooTextBox.cs

index de0d471..fbfb0e5 100644 (file)
@@ -1021,13 +1021,12 @@ namespace FooEditEngine
             try
             {
                 this.Clear();
-                this.FireUpdateEvent = false;
                 this.LayoutLines.IsFrozneDirtyFlag = true;
                 await this.buffer.LoadAsync(fs, tokenSource);
             }
             finally
             {
-                this.FireUpdateEvent = true;
+                this.PerformLayout();
                 //これ以降の操作にだけダーティフラグを適用しないとおかしなことになる
                 this.LayoutLines.IsFrozneDirtyFlag = false;
                 if (this.LoadProgress != null)
index 55a9346..0fdc448 100644 (file)
@@ -226,9 +226,6 @@ namespace FooEditEngine
 #endif
                 Array.Clear(str, 0, str.Length);
             } while (readCount > 0);
-
-            this.Update(this, new DocumentUpdateEventArgs(UpdateType.Clear, -1, -1, -1));
-            this.Update(this, new DocumentUpdateEventArgs(UpdateType.Replace, 0, 0, buf.Count));
         }
 
         internal void ReplaceRegexAll(LineToIndexTable layoutlines, Regex regex, string pattern, bool groupReplace)
index 6d3a650..f27755b 100644 (file)
@@ -351,7 +351,6 @@ namespace FooEditEngine.UWP
 
                 if (this.verticalScrollBar != null)
                     this.verticalScrollBar.Maximum = this.View.LayoutLines.Count;
-                this.View.CalculateLineCountOnScreen();
                 this.IsEnabled = true;
             }
         }