Fix text color glitch after palette update.

Once again fixes #4774.
This commit is contained in:
John Preston 2018-06-07 21:25:10 +03:00
parent 2ab40de8b9
commit 122ab94f3d
1 changed files with 10 additions and 0 deletions

View File

@ -1246,6 +1246,16 @@ void InputField::updatePalette() {
}
}
}
cursor = textCursor();
if (!cursor.hasSelection()) {
auto format = cursor.charFormat();
format.merge(PrepareTagFormat(
_st,
format.property(kTagProperty).toString()));
cursor.setCharFormat(format);
setTextCursor(cursor);
}
}
void InputField::onTouchTimer() {