← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~verzegnassi-stefano/ubuntu-docviewer-app/reboot-lok-singleshot into lp:ubuntu-docviewer-app/reboot

 

Stefano Verzegnassi has proposed merging lp:~verzegnassi-stefano/ubuntu-docviewer-app/reboot-lok-singleshot into lp:ubuntu-docviewer-app/reboot.

Commit message:
[loviewer] Fixed 'singleShot' property not set for m_updateTimer

Requested reviews:
  Ubuntu Document Viewer Developers (ubuntu-docviewer-dev)

For more details, see:
https://code.launchpad.net/~verzegnassi-stefano/ubuntu-docviewer-app/reboot-lok-singleshot/+merge/274196

[loviewer] Fixed 'singleShot' property not set for m_updateTimer

Kinda the third time I'm going to fix it. Probably the fix has been gone lost during the multiple merges/rewritings of the core part of the viewer.
-- 
Your team Ubuntu Document Viewer Developers is requested to review the proposed merge of lp:~verzegnassi-stefano/ubuntu-docviewer-app/reboot-lok-singleshot into lp:ubuntu-docviewer-app/reboot.
=== modified file 'src/plugin/libreofficetoolkit-qml-plugin/loview.cpp'
--- src/plugin/libreofficetoolkit-qml-plugin/loview.cpp	2015-10-12 00:02:26 +0000
+++ src/plugin/libreofficetoolkit-qml-plugin/loview.cpp	2015-10-12 23:12:52 +0000
@@ -343,8 +343,11 @@
 
 void LOView::scheduleVisibleRectUpdate()
 {
-    if (!m_updateTimer.isActive())
-        m_updateTimer.start(20);
+    if (m_updateTimer.isActive())
+        return;
+
+    m_updateTimer.setSingleShot(true);
+    m_updateTimer.start(20);
 }
 
 void LOView::slotTileRenderFinished(int id, QImage img)


Follow ups