Bug 374079 - Context menu for annotations
Summary: Context menu for annotations
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: PDF backend (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-23 13:36 UTC by BasioMeusPuga
Modified: 2016-12-28 17:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Context menu for overlapping annotations (17.10 KB, image/png)
2016-12-23 13:36 UTC, BasioMeusPuga
Details
Screenshot showing the context menu in okular 0.26.1 (245.97 KB, image/png)
2016-12-27 17:59 UTC, Oliver Sander
Details
Screenshot showing the context menu in okular from current git master (257.38 KB, image/png)
2016-12-27 18:00 UTC, Oliver Sander
Details

Note You need to log in before you can comment on or make changes to this bug.
Description BasioMeusPuga 2016-12-23 13:36:03 UTC
Created attachment 102957 [details]
Context menu for overlapping annotations

In case of overlapping annotations, the context menu gives you no way of telling which option belongs to which annotation.

Current behavior:
I've included a screenshot as an example. This is a case of a highlight, a line drawing, and an underline. There's no way to tell which is which without trial and error.

Expected behavior:
Context menu options are grouped by annotation

I'm fairly certain this is new behavior for Okular 16.12.0.
Comment 1 Oliver Sander 2016-12-23 16:02:40 UTC
Can you share a pdf file with such overlapping annotations?
Comment 2 BasioMeusPuga 2016-12-23 16:22:46 UTC
Yes. This is a PDF textbook:

https://mega.nz/#!44M0kTxL!dOijXerRTxBiB09Q8YSW6Nbyi34IGncFO_CKmFLjFDQ

I understandably go a little overboard with the 'paint everything' approach, but I'd posit it's almost essential for organization within technical texts that need to be revisited repeatedly. Don't even get me started on what my Harrison looks like.
Comment 3 Oliver Sander 2016-12-27 17:58:53 UTC
Confirmed.  This is a regression.  See the attached screenshots of two overlapping annotations once with okular 0.26.1 from Debian testing, and once with the current Okular git master.  You see that the former shows the annotation type ("Hervorhebung", i.e., "Highlight").
Comment 4 Oliver Sander 2016-12-27 17:59:38 UTC
Created attachment 103023 [details]
Screenshot showing the context menu in okular 0.26.1
Comment 5 Oliver Sander 2016-12-27 18:00:17 UTC
Created attachment 103024 [details]
Screenshot showing the context menu in okular from current git master
Comment 6 Albert Astals Cid 2016-12-28 16:05:52 UTC
Git commit e833b3ce6504903df966cd2f0662c8d180b650ff by Albert Astals Cid.
Committed on 28/12/2016 at 16:05.
Pushed by aacid into branch 'Applications/16.12'.

Fix menu titles not showing up

QMenu title/section are optional to draw from the style side but we have crucial information in them
so reuse old KMenu code to create a fake action that behaves as title

I'll see if KF5 wants to accept this as contribution later

M  +1    -0    CMakeLists.txt
M  +3    -2    part.cpp
M  +3    -2    ui/annotationpopup.cpp
A  +65   -0    ui/okmenutitle.cpp     [License: LGPL (v2)]
A  +31   -0    ui/okmenutitle.h     [License: LGPL (v2)]
M  +3    -2    ui/pageview.cpp

https://commits.kde.org/okular/e833b3ce6504903df966cd2f0662c8d180b650ff
Comment 7 Oliver Sander 2016-12-28 17:30:29 UTC
Thanks for the fix.  Will this also go into the master branch?