diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-01-07 10:46:26 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2014-01-07 13:18:41 +0200 |
commit | 8566d712a87d9e3a78be15b6bd3498c2cf8afe57 (patch) | |
tree | 6ae292f0fd8c870d997db6d208a531da5f9320f0 /tests/surfacetest/graphmodifier.cpp | |
parent | aa842c39480aa5b95f704c97b8b3acc821144883 (diff) |
Fix setting theme type
Now reset the theme properties immediately to new theme type, instead
of waiting for the theme activation. Also make changing theme type
later work consistently.
Task-number: QTRD-2750
Change-Id: I970d69587623119df33ad2a825fbc12367804eae
Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Diffstat (limited to 'tests/surfacetest/graphmodifier.cpp')
-rw-r--r-- | tests/surfacetest/graphmodifier.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/surfacetest/graphmodifier.cpp b/tests/surfacetest/graphmodifier.cpp index 749b1c69..be96a696 100644 --- a/tests/surfacetest/graphmodifier.cpp +++ b/tests/surfacetest/graphmodifier.cpp @@ -363,10 +363,7 @@ void GraphModifier::selectedPointChanged(const QPoint &point) void GraphModifier::changeTheme(int theme) { - Q3DTheme *currentTheme = m_graph->activeTheme(); - m_graph->releaseTheme(currentTheme); - delete currentTheme; - m_graph->setActiveTheme(new Q3DTheme(Q3DTheme::Theme(theme))); + m_graph->activeTheme()->setType(Q3DTheme::Theme(theme)); } |