Bug 402110 - Table Selection should not pollute clipboard history
Summary: Table Selection should not pollute clipboard history
Status: RESOLVED FIXED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Unspecified
: NOR wishlist
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2018-12-13 22:45 UTC by Laura David Hurka
Modified: 2020-12-25 13:04 UTC (History)
1 user (show)

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


Attachments
Polluted clipboard history (69.66 KB, image/png)
2018-12-13 22:45 UTC, Laura David Hurka
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laura David Hurka 2018-12-13 22:45:53 UTC
Created attachment 116911 [details]
Polluted clipboard history

SUMMARY
The Table Selection Tool copies the selection to the clipboard everytime the table layout is changed.

STEPS TO REPRODUCE
(1. Open the clipboard and make it sticky (Possible in Plasma 5))
2. Select a table using the Table Selection Tool
3. Divide the table in another layout than suggested by Okular

OBSERVED RESULT
After 2.: The table is immediately copied to the clipboard
After 3.: Everytime a line is added or removed from the table layout, a new version of the selection is copied to the clipboard. Older clipboard entries get lost.
Additionally: There is no context menu entry for "Copy", which would be intuitive, I think.

EXPECTED RESULT
The table is copied to the clipboard when the action "Copy" is triggered (e. g. by pressing Ctrl+C).

SOFTWARE/OS VERSIONS
Okular version: 1.5.3
Operating System: KDE neon 5.14
KDE Plasma Version: 5.14.4
Qt Version: 5.11.2
KDE Frameworks Version: 5.53.0

ADDITIONAL INFORMATION
There is an info message appearing in the top left when the Table Selection Tool is activated. It says: "Draw a rectangle around the table, then click near the edges do divide up; press Esc to clear." It doesn't mention the clipboard, altough is vital for this tool. We could add "Ctrl+C to copy to clipboard;" or "right click to copy to clipboard;" or ...
Comment 1 Albert Astals Cid 2018-12-16 22:26:26 UTC
Yeah i agree it's a bit unfortunate, problem is, it is how it has worked for a long time, so we need to make sure that when we change it, people don't think it's a bug or something.

What you say of changing the "Help toolip" to include they have to copy it explicitely via shortcut or menu, may be enough though.
Comment 2 Bug Janitor Service 2020-12-09 14:35:22 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/okular/-/merge_requests/335
Comment 3 Laura David Hurka 2020-12-25 13:04:49 UTC
Git commit 2917e73953a5f71c8a818c552f312a73d06ac406 by David Hurka, on behalf of Steven Chua.
Committed on 25/12/2020 at 13:04.
Pushed by davidhurka into branch 'master'.

Fix Table Selection polluting clipboard history

The Table Select tool no longer automatically copies its
contents to the clipboard, but only to the selection clipboard.
(Middle-click paste clipboard.) Instead, after creating
the table, the user can right-click to bring up a popup
menu with the action "Copy Table Contents to the Clipboard".
Clicking on this will copy the table contents to the clipboard.
Ctrl+C also works.

M  +6    -2    doc/index.docbook
M  +99   -71   part/pageview.cpp
M  +2    -0    part/pageview.h

https://invent.kde.org/graphics/okular/commit/2917e73953a5f71c8a818c552f312a73d06ac406