From 6938fe1e26bbc0f03981403f593445b5faf9d79b Mon Sep 17 00:00:00 2001 From: Nikolaj Olsson Date: Fri, 8 Sep 2017 15:22:58 +0200 Subject: [PATCH] Optimize (minor) status log - thx ivandrofly :) Fix #2563 --- src/Forms/StatusLog.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Forms/StatusLog.cs b/src/Forms/StatusLog.cs index bddd3593d..9cd5724d8 100644 --- a/src/Forms/StatusLog.cs +++ b/src/Forms/StatusLog.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Linq; using System.Text; using Nikse.SubtitleEdit.Core; using System.Windows.Forms; @@ -31,14 +30,14 @@ namespace Nikse.SubtitleEdit.Forms timer1.Stop(); if (_logCount != _log.Count) { + _logCount = _log.Count; var sb = new StringBuilder(); - foreach (var logEntry in _log.AsEnumerable().Reverse()) + for (int i = _logCount - 1; i >= 0; i--) { - sb.AppendLine(logEntry); + sb.AppendLine(_log[i]); } textBoxStatusLog.Text = sb.ToString(); } - _logCount = _log.Count; timer1.Start(); } @@ -47,4 +46,4 @@ namespace Nikse.SubtitleEdit.Forms Close(); } } -} +} \ No newline at end of file