Review Request: Fix crash in stage's slide sorter when one page is bigger than the viewport

Paul Mendez paulestebanms at gmail.com
Sat Aug 20 20:27:40 BST 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102351/#review5861
-----------------------------------------------------------



stage/part/KPrSlidesManagerView.cpp
<http://git.reviewboard.kde.org/r/102351/#comment5183>

    cursorSlideIndex() method is used in drag&drop to determine where a slide must be inserted, so when the user clicks in the white space after the last slide, this method return an index outside the pages list.
    The -1 on line 210 lets select the slide that is placed just before the place where the user click, without the -1 the slide selected is the slide under the cursor or just after the cursor position (this behaviour seems logical except when you click in the margin at the end of a row and the slide selected is at the beggining of the next row). 
    In both cases there must be tested a exception case: In the first case it must be checked if the cursor is over or before the first slide because in that case nothing gets selected. 
    In the second case it must be checked if the cursor is after the last slide or the app crash as I explained before.
    I am not sure of which case is better. Maybe there is other solution.
    


- Paul


On Aug. 17, 2011, 7:25 p.m., Peter Simonsson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102351/
> -----------------------------------------------------------
> 
> (Updated Aug. 17, 2011, 7:25 p.m.)
> 
> 
> Review request for Calligra.
> 
> 
> Summary
> -------
> 
> The slides sorter crashed on right click outside a page when the page itself is bigger than the viewport. Also fixed so that a page gets selected on right click if none is selected already as the code says it should be.
> 
> 
> Diffs
> -----
> 
>   stage/part/KPrSlidesManagerView.cpp 1e3d08e 
> 
> Diff: http://git.reviewboard.kde.org/r/102351/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Peter
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20110820/495b7861/attachment.htm>


More information about the calligra-devel mailing list