← Back to team overview

openlp-core team mailing list archive

[Bug 1081469] Re: Cut/Copy & Paste in song editor causes characters to disappear

 

Not quite. If nothing is selected and you and you want to paste in the middle of the word, then you right click then click paste. Only this does not work as expected as the code at lines 87 & 88 (see below) selects the whole word when the user right clicks.
So basically it is impossible not to overwrite some current text.

Code:
if not cursor.hasSelection():
            cursor.select(QtGui.QTextCursor.WordUnderCursor)

As an eaxmple:
A verse has the following text:
Verse 1 Line 2
Verse 1 Line 1
Verse 1 Line 3

I then realise that line 1 & 2 are the wrong way round. So I select line 1 and cut it.
I press delete to delete the space which is left behind.
I position the cursor at the beginning of the first line (no selection), right click.
OpenLP selects the nearest word in this case "Verse". Clicking paste replaces the word with the text to paste. So we end up with:

Verse1 Line 1 1 Line 2
Verse 1 Line 3

To make this absolutely clear. Position the cursor anywhere, but do not
select anything right click and then press escape to exit the context
menu, now you can see that the word closest to where you right clicked
has been selected.

Other software just moves the cursor to that position.

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1081469

Title:
  Cut/Copy & Paste in song editor causes characters to disappear

Status in OpenLP - Worship Presentation Software:
  Confirmed

Bug description:
  See http://openlp.org/en/forums/general-support/development/song-
  content-text-editing-bug#comment-5261

  How to repoduce:
  1. Select some text (doesn't matter how much)
  2. Copy or cut using either the keyboard shortcuts (Ctrl + x. Ctrl + C) or the (right click) context menu
  3. Select a different location
  4. Right click to bring up the context menu and click on paste.

  A number of characters are removed

  Interestingly this does not happen if you use the keyboard short cut
  to paste (Ctrl + V) , so it appears to be caused by the paste option
  on the context menu.

  Windows XP, OpenLP 1.9.12

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1081469/+subscriptions


References