summaryrefslogtreecommitdiffstats
path: root/tests/surfacetest/graphmodifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/surfacetest/graphmodifier.cpp')
-rw-r--r--tests/surfacetest/graphmodifier.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/surfacetest/graphmodifier.cpp b/tests/surfacetest/graphmodifier.cpp
index 3474b67f..749b1c69 100644
--- a/tests/surfacetest/graphmodifier.cpp
+++ b/tests/surfacetest/graphmodifier.cpp
@@ -338,12 +338,12 @@ void GraphModifier::changeFont(const QFont &font)
{
QFont newFont = font;
newFont.setPointSizeF(m_fontSize);
- m_graph->theme()->setFont(newFont);
+ m_graph->activeTheme()->setFont(newFont);
}
void GraphModifier::changeStyle()
{
- m_graph->theme()->setLabelBackgroundEnabled(!m_graph->theme()->isLabelBackgroundEnabled());
+ m_graph->activeTheme()->setLabelBackgroundEnabled(!m_graph->activeTheme()->isLabelBackgroundEnabled());
}
void GraphModifier::selectButtonClicked()
@@ -363,7 +363,10 @@ void GraphModifier::selectedPointChanged(const QPoint &point)
void GraphModifier::changeTheme(int theme)
{
- m_graph->setTheme(new Q3DTheme(Q3DTheme::Theme(theme)));
+ Q3DTheme *currentTheme = m_graph->activeTheme();
+ m_graph->releaseTheme(currentTheme);
+ delete currentTheme;
+ m_graph->setActiveTheme(new Q3DTheme(Q3DTheme::Theme(theme)));
}