From a1d2f784dc508eeb1fdbd613f4c9e077633501da Mon Sep 17 00:00:00 2001 From: Mike Krus Date: Wed, 26 Feb 2020 19:42:08 +0000 Subject: Track dirty state on front end nodes Nothing clears the state yet, will be up to the core aspect to do that. Change-Id: Ia3a5297a4b837b1d67545bd29ddce56666c520f3 Reviewed-by: Paul Lemire --- src/extras/text/qtext2dentity.cpp | 12 ++++++------ src/extras/text/qtext2dentity_p.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/extras') diff --git a/src/extras/text/qtext2dentity.cpp b/src/extras/text/qtext2dentity.cpp index a159ffab5..ecd8be440 100644 --- a/src/extras/text/qtext2dentity.cpp +++ b/src/extras/text/qtext2dentity.cpp @@ -186,7 +186,7 @@ void QText2DEntityPrivate::setScene(Qt3DCore::QScene *scene) m_glyphCache = entry.glyphCache; ++entry.count; // Update to populate glyphCache if needed - update(); + updateGlyphs(); } } @@ -325,7 +325,7 @@ void QText2DEntityPrivate::clearCurrentGlyphRuns() m_currentGlyphRuns.clear(); } -void QText2DEntityPrivate::update() +void QText2DEntityPrivate::updateGlyphs() { if (m_glyphCache == nullptr) return; @@ -387,7 +387,7 @@ void QText2DEntity::setFont(const QFont &font) emit fontChanged(font); if (!d->m_text.isEmpty()) - d->update(); + d->updateGlyphs(); } } @@ -434,7 +434,7 @@ void QText2DEntity::setText(const QString &text) d->m_text = text; emit textChanged(text); - d->update(); + d->updateGlyphs(); } } @@ -468,7 +468,7 @@ void QText2DEntity::setWidth(float width) if (width != d->m_width) { d->m_width = width; emit widthChanged(width); - d->update(); + d->updateGlyphs(); } } @@ -478,7 +478,7 @@ void QText2DEntity::setHeight(float height) if (height != d->m_height) { d->m_height = height; emit heightChanged(height); - d->update(); + d->updateGlyphs(); } } diff --git a/src/extras/text/qtext2dentity_p.h b/src/extras/text/qtext2dentity_p.h index b98c62ce3..ba907e7f9 100644 --- a/src/extras/text/qtext2dentity_p.h +++ b/src/extras/text/qtext2dentity_p.h @@ -105,7 +105,7 @@ public: void setCurrentGlyphRuns(const QVector &runs); void clearCurrentGlyphRuns(); - void update(); + void updateGlyphs(); struct CacheEntry { -- cgit v1.2.3