summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2023-03-02 10:37:01 +0200
committerTomi Korpipaa <tomi.korpipaa@qt.io>2023-03-02 12:15:34 +0200
commit27d85da4089b0004a81184b09e9b0c0258f0c8e2 (patch)
treef4785401f14e9e505cc3636c45d2cf24a28efe96
parent84e55051da2a2c9e8ea81815b0d53c03426f2133 (diff)
Fix series gradient override bug
Fixes: QTBUG-111669 Change-Id: I0f5ec66a26119c173b428c947fdb416f3b69e2a6 Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
-rw-r--r--src/graphs/engine/abstract3dcontroller.cpp4
-rw-r--r--src/graphs/engine/abstract3dcontroller_p.h3
-rw-r--r--src/graphs/qml/qquickdatavisitem.cpp2
3 files changed, 4 insertions, 5 deletions
diff --git a/src/graphs/engine/abstract3dcontroller.cpp b/src/graphs/engine/abstract3dcontroller.cpp
index abcd86a1..ebb7bfd5 100644
--- a/src/graphs/engine/abstract3dcontroller.cpp
+++ b/src/graphs/engine/abstract3dcontroller.cpp
@@ -5,6 +5,7 @@
#include "qabstract3daxis_p.h"
#include "qvalue3daxis_p.h"
#include "qcategory3daxis_p.h"
+#include "qquickdatavisitem_p.h"
#include "qabstract3dseries_p.h"
#include "q3dscene_p.h"
#include "qabstract3dinputhandler_p.h"
@@ -269,8 +270,7 @@ void Abstract3DController::handleThemeTypeChanged(Q3DTheme::Theme theme)
// Changing theme type is logically equivalent of changing the entire theme
// object, so reset all attached series to the new theme.
- // TODO: Setting this to true breaks at least series gradient override, probably other things too (QTBUG-111669)
- bool force = true;//m_qml->isReady();
+ bool force = m_qml->isReady();
Q3DTheme *activeTheme = m_themeManager->activeTheme();
for (int i = 0; i < m_seriesList.size(); i++)
m_seriesList.at(i)->d_ptr->resetToTheme(*activeTheme, i, force);
diff --git a/src/graphs/engine/abstract3dcontroller_p.h b/src/graphs/engine/abstract3dcontroller_p.h
index 3a9b19ce..eed89af6 100644
--- a/src/graphs/engine/abstract3dcontroller_p.h
+++ b/src/graphs/engine/abstract3dcontroller_p.h
@@ -31,7 +31,6 @@ QT_BEGIN_NAMESPACE
class QValue3DAxis;
class QCategory3DAxis;
-class AbstractDeclarativeInterface;
class AbstractDeclarative;
class QAbstract3DSeries;
class ThemeManager;
@@ -201,7 +200,7 @@ protected:
qreal m_margin;
QMutex m_renderMutex;
- AbstractDeclarativeInterface *m_qml = nullptr;
+ QQuickDataVisItem *m_qml = nullptr;
explicit Abstract3DController(QRect initialViewport, Q3DScene *scene, QObject *parent = 0);
diff --git a/src/graphs/qml/qquickdatavisitem.cpp b/src/graphs/qml/qquickdatavisitem.cpp
index aa35e310..d934ed15 100644
--- a/src/graphs/qml/qquickdatavisitem.cpp
+++ b/src/graphs/qml/qquickdatavisitem.cpp
@@ -410,7 +410,7 @@ void QQuickDataVisItem::setSharedController(Abstract3DController *controller)
{
Q_ASSERT(controller);
m_controller = controller;
-// m_controller->m_qml = this;
+ m_controller->m_qml = this;
if (!m_controller->isOpenGLES())
setMsaaSamples(4);