From db965eb7667662824a420981e2059a5da8025a5b Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Wed, 27 Jul 2011 05:54:25 +0000 Subject: [PATCH] Unbreak tag hiding in the grid Originally committed to SVN as r5524. --- aegisub/src/base_grid.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/aegisub/src/base_grid.cpp b/aegisub/src/base_grid.cpp index 43f93289d..add770304 100644 --- a/aegisub/src/base_grid.cpp +++ b/aegisub/src/base_grid.cpp @@ -509,15 +509,14 @@ void BaseGrid::DrawImage(wxDC &dc) { bool in_comment = false; for (size_t j = 0; j < textlen; ++j) { wxChar curChar = curDiag->Text[j]; - if (curChar == '{') + if (curChar == '{') { + if (!in_comment && mode == 1) value += replaceWith; in_comment = true; + } else if (in_comment && curChar == '}') { - if (mode == 1) { - value += replaceWith; - } in_comment = false; } - else { + else if (!in_comment) { value += curChar; } }