summaryrefslogtreecommitdiffstats
path: root/src/datavisualization/engine/surface3dcontroller.cpp
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@digia.com>2013-10-15 12:52:02 +0300
committerMiikka Heikkinen <miikka.heikkinen@digia.com>2013-10-15 12:56:39 +0300
commit7861ae308bd9fd495f677400cc07c657a1439656 (patch)
tree994bab0cd5a31728ec653c2b3886ee15bed8ced0 /src/datavisualization/engine/surface3dcontroller.cpp
parent0109b085710bfabc81faf43118ad5654cbd96081 (diff)
Fix crashes and bugs when using surface with ES2
+Fix compile warnings +Fix qmlsurface example Change-Id: I28bbf38e7aa51b1ec315374182a9daae8eded87c Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavisualization/engine/surface3dcontroller.cpp')
-rw-r--r--src/datavisualization/engine/surface3dcontroller.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/datavisualization/engine/surface3dcontroller.cpp b/src/datavisualization/engine/surface3dcontroller.cpp
index 2272b731..c8823eb7 100644
--- a/src/datavisualization/engine/surface3dcontroller.cpp
+++ b/src/datavisualization/engine/surface3dcontroller.cpp
@@ -79,8 +79,11 @@ void Surface3DController::synchDataToRenderer()
}
if (m_changeTracker.smoothStatusChanged) {
+ bool oldSmoothStatus = m_isSmoothSurfaceEnabled;
m_isSmoothSurfaceEnabled = m_renderer->updateSmoothStatus(m_isSmoothSurfaceEnabled);
m_changeTracker.smoothStatusChanged = false;
+ if (oldSmoothStatus != m_isSmoothSurfaceEnabled)
+ emit smoothSurfaceEnabledChanged(m_isSmoothSurfaceEnabled);
}
if (m_changeTracker.surfaceGridChanged) {
@@ -110,9 +113,13 @@ void Surface3DController::handleAxisRangeChangedBySender(QObject *sender)
void Surface3DController::setSmoothSurface(bool enable)
{
+ bool changed = m_isSmoothSurfaceEnabled != enable;
m_isSmoothSurfaceEnabled = enable;
m_changeTracker.smoothStatusChanged = true;
emitNeedRender();
+
+ if (changed)
+ emit smoothSurfaceEnabledChanged(m_isSmoothSurfaceEnabled);
}
bool Surface3DController::smoothSurface()