Bug 318828 - Wrong ObjectRect after modifying annotation properties in a rotated document
Summary: Wrong ObjectRect after modifying annotation properties in a rotated document
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 0.16.60
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-25 00:42 UTC by Fabio D'Urso
Modified: 2013-05-07 20:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Example PDF file (11.13 KB, application/pdf)
2013-04-25 00:43 UTC, Fabio D'Urso
Details
Wrong fix (817 bytes, text/plain)
2013-04-25 00:59 UTC, Fabio D'Urso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fabio D'Urso 2013-04-25 00:42:44 UTC
After modifying an annotation's properties (i.e. right click -> properties) in a rotated document, its ObjectRect (=the object used for mouse hit testing) gets wrong.
Its normalized coordinates would be correct if the document was not rotated, so it must be a missing rotation somewhere.

This happens on any document, I'm attaching an example one I've made to better explain the issue.

Reproducible: Always

Steps to Reproduce:
1. Open the attached document
2. Rotate it by 90 degrees so that the text looks horizontal
3. Right-click on the annotation and edit some property (e.g. its color)
4. Confirm
5. Notice how right-click no longer works properly: the hitbox now roughly corresponds to the blue area. Right clicks on the upper/lower parts of the ellipse don't "find" the annotation.
Comment 1 Fabio D'Urso 2013-04-25 00:43:50 UTC
Created attachment 79428 [details]
Example PDF file
Comment 2 Fabio D'Urso 2013-04-25 00:59:28 UTC
Created attachment 79429 [details]
Wrong fix

I've tried to fix it myself, and the attached patch indeed fixes the issue, but it's obviously a wrong fix.
Comment 3 Fabio D'Urso 2013-04-25 01:01:29 UTC
Jon, can you have a look at this issue?
Comment 4 Jon Mease 2013-04-26 15:38:08 UTC
Sure thing. May be a few days but I'll take a look soon.
Comment 5 Jon Mease 2013-04-28 01:38:08 UTC
Proposed fix and unit test submitted for review https://git.reviewboard.kde.org/r/110229/
Comment 6 Albert Astals Cid 2013-05-07 20:06:45 UTC
Git commit 4296ac7e5dd579aa43845df80739c6a4f45284db by Albert Astals Cid, on behalf of Jon Mease.
Committed on 07/05/2013 at 22:05.
Pushed by aacid into branch 'master'.

Rotate annotation to match page when setting annotation's properties
REVIEW:110229

M  +3    -0    core/annotations.cpp
M  +30   -0    tests/modifyannotationpropertiestest.cpp

http://commits.kde.org/okular/4296ac7e5dd579aa43845df80739c6a4f45284db