summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/q3dlight.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2013-09-12 09:53:52 +0300
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2013-09-12 10:31:27 +0300
commit7f8966b035c9fd73d2cde04521c92892feefc0f9 (patch)
tree55fee47c70805ff6bd4df1a8cd7693ea34132b27 /src/datavisualization/engine/q3dlight.cpp
parent1262c6562d7264c9fe4caf2f433615348c0f2ef8 (diff)
Fix Q3DScene caching
Task-number: QTRD-2258 Change-Id: Ifce23dca40566e75398e00975e8b2159b325739e Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com> Reviewed-by: Pasi Keränen <pasi.keranen@digia.com>
Diffstat (limited to 'src/datavisualization/engine/q3dlight.cpp')
-rw-r--r--src/datavisualization/engine/q3dlight.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/datavisualization/engine/q3dlight.cpp b/src/datavisualization/engine/q3dlight.cpp
index 80debb83..214efa5d 100644
--- a/src/datavisualization/engine/q3dlight.cpp
+++ b/src/datavisualization/engine/q3dlight.cpp
@@ -46,4 +46,15 @@ Q3DLightPrivate::~Q3DLightPrivate()
{
}
+// Copies changed values from this light to the other light. If the other light had same changes,
+// those changes are discarded.
+void Q3DLightPrivate::sync(Q3DLight &other)
+{
+ if (q_ptr->isDirty()) {
+ other.copyValuesFrom(*q_ptr);
+ q_ptr->setDirty(false);
+ other.setDirty(false);
+ }
+}
+
QT_DATAVISUALIZATION_END_NAMESPACE