MacOS : CMD-A (select all) in text leaves behind the 'a' character

• Jan 31, 2014 - 09:45
S4 - Minor

It looks like CMD-A does:

- select all
- type an 'a'

Which results in the selected text being replaced with an 'a' character.

I'll take a look at it...


The behavior in SimpleText is different. CMD-A inserts an A at the beginning. This is because SimpleText::deleteSelectedText() appears to be a NOOP for single-line text objects.

The test if ( r1 != r2 ) is false for single line text objects so the delete never happens. Or, so that is my read at 2AM...

This also explains why selecting text and then pressing DELETE in the title of a score does nothing unless the selection spans multiple lines.

I think all the cases in Text::edit() that satisfy the (modifiers == Qt::ControlModifier) test should return true rather than break. The key input has been processed and there is nothing left to do.