← Back to team overview

ubuntu-touch-coreapps-reviewers team mailing list archive

[Merge] lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1444971 into lp:ubuntu-docviewer-app

 

Stefano Verzegnassi has proposed merging lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1444971 into lp:ubuntu-docviewer-app.

Commit message:
[PDF] Fixed an issue while going to the first not visible item in VerticalView

Requested reviews:
  Ubuntu Document Viewer Developers (ubuntu-docviewer-dev)
Related bugs:
  Bug #1444971 in Ubuntu Document Viewer App: "docviewer crashes on going at specific page"
  https://bugs.launchpad.net/ubuntu-docviewer-app/+bug/1444971

For more details, see:
https://code.launchpad.net/~verzegnassi-stefano/ubuntu-docviewer-app/fix-1444971/+merge/256475

[PDF] Fixed an issue while going to the first not visible item in VerticalView
-- 
Your team Ubuntu Document Viewer Developers is requested to review the proposed merge of lp:~verzegnassi-stefano/ubuntu-docviewer-app/fix-1444971 into lp:ubuntu-docviewer-app.
=== modified file 'src/plugin/poppler-qml-plugin/verticalview.cpp'
--- src/plugin/poppler-qml-plugin/verticalview.cpp	2015-02-04 19:19:21 +0000
+++ src/plugin/poppler-qml-plugin/verticalview.cpp	2015-04-16 12:23:22 +0000
@@ -308,7 +308,7 @@
     if (m_delegateModel->count() <= 0)
         return;
 
-    if (index < m_firstVisibleIndex || index > m_firstVisibleIndex + m_visibleItems.length()) {
+    if (index < m_firstVisibleIndex || index > m_firstVisibleIndex + m_visibleItems.length() - 1) {
         // TODO This could be optimized by trying to reuse the interesection
         // of items that may end up intersecting between the existing
         // m_visibleItems and the items we are creating in the next loop


Follow ups