Bug 487181

Summary: Text gets pasted twice after copy / paste
Product: [Applications] Marknote Reporter: hbr <nepnep>
Component: GeneralAssignee: mbruchert <mbb>
Status: RESOLVED FIXED    
Severity: normal CC: carl, mbb
Priority: NOR    
Version First Reported In: 1.2.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: 01_The_Text_For_Copy_Pasting.png
02_The_Text_After_Pasting_It_Further_Down_In_The_Note.png

Description hbr 2024-05-18 10:00:38 UTC
Created attachment 169589 [details]
01_The_Text_For_Copy_Pasting.png

Text gets pasted twice after copy / paste in the same or a different note

STEPS TO REPRODUCE
1. Add some text to a note and format it
2. Copy the text
3. Paste it at another position in the same note or in a different note 

OBSERVED RESULT
The text gets pasted twice. Once without any formatting and once with formatting

EXPECTED RESULT
The text gets ony pasted once with formatting

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.0
Kernel Version: 6.9.1-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Comment 1 hbr 2024-05-18 10:01:06 UTC
Created attachment 169590 [details]
02_The_Text_After_Pasting_It_Further_Down_In_The_Note.png
Comment 2 hbr 2024-05-18 12:48:38 UTC
A quick update:

It only happens when using CTRL + V to paste. It does not happen when using middle click or the context menu to paste.

It is also unrelated to the text being formatted or not. In case of unformatted text that also gets pasted twice when pasting with CTRL + V.
Comment 3 Carl Schwan 2024-05-18 13:48:25 UTC
Git commit 78510f5c8da176051e66e21aaff4dba460efeccf by Carl Schwan.
Committed on 18/05/2024 at 13:49.
Pushed by carlschwan into branch 'master'.

Fix double copy paste

M  +1    -0    src/documenthandler.cpp

https://invent.kde.org/office/marknote/-/commit/78510f5c8da176051e66e21aaff4dba460efeccf