mirror of
https://github.com/overte-org/overte.git
synced 2025-04-22 09:13:28 +02:00
Delete old TextRenderer after new one is in place
This commit is contained in:
parent
215c260c9e
commit
e85eb246d2
1 changed files with 2 additions and 1 deletions
|
@ -174,6 +174,7 @@ QSizeF TextOverlay::textSize(const QString& text) const {
|
|||
void TextOverlay::setFontSize(int fontSize) {
|
||||
_fontSize = fontSize;
|
||||
|
||||
delete _textRenderer;
|
||||
auto oldTextRenderer = _textRenderer;
|
||||
_textRenderer = TextRenderer::getInstance(SANS_FONT_FAMILY, _fontSize, DEFAULT_FONT_WEIGHT);
|
||||
delete oldTextRenderer;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue