<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/129284/">https://git.reviewboard.kde.org/r/129284/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On March 11th, 2017, 6:15 p.m. CET, <b>Albert Astals Cid</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">What do you mean with "if scrolled to page (with left-right cursor)"?</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Maybe you can add an autotest for this?</p></pre>
 </blockquote>







</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">When you press cursor left or cursor right it scrolls the document to previous/next page, and it sets only the page number in the viewport without additional position (rePos.enabled=false, which aligns the top of the page to the top of the viewport). When a document is loaded with such a viewport, a rePos is generated, and if the viewport was on page 104 initially, the rePos one will be set to an offset such that the divider between pages 103 and 104 is in the center.

My patch intended to fix this by making the center of the selected page the center of the viewport instead of the top edge of the page. It's not 100% correct though: if the default zoom is high, the center of the page may not be the desired starting viewport. The best solution would be to avoid generating rePos upon loading a file, but that seems like a lot of work.</pre>
<br />










<p>- Miklós</p>


<br />
<p>On October 30th, 2016, 3:28 p.m. CET, Miklós Máté wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for Okular.</div>
<div>By Miklós Máté.</div>


<p style="color: grey;"><i>Updated Oct. 30, 2016, 3:28 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
okular
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
 <table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
 <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This fixes the problem for now, but the whole load/relayout/scroll logic cries for a refactoring. For example, upon loading a file the viewport is set 4 times, and if the viewport was "104" initially, it becomes "104;C2:0.49933:0.499527:1" in the end.</pre>
  </td>
 </tr>
</table>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>ui/pageview.cpp <span style="color: grey">(bb540cb)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/129284/diff/" style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>







  </div>
 </body>
</html>