Unbreak tag hiding in the grid

Originally committed to SVN as r5524.
This commit is contained in:
Thomas Goyne 2011-07-27 05:54:25 +00:00
parent d937bd80e7
commit db965eb766
1 changed files with 4 additions and 5 deletions

View File

@ -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;
}
}