r14119 by cbradney - #7798: When deleting in text edit mode by pressing a character, ensure keyboard modifiers are also not pressed
scribus-commit
scribus-commit at lists.scribus.net
Thu Oct 8 21:40:33 CEST 2009
Revision: 14119
Author: cbradney
Date: 2009-10-08T19:07:00.315607Z
Commit message: #7798: When deleting in text edit mode by pressing a character, ensure keyboard modifiers are also not pressed
Changeset:
M /branches/Version135/Scribus/scribus/pageitem_textframe.cpp
Diffs:
Index: scribus/pageitem_textframe.cpp
===================================================================
--- scribus/pageitem_textframe.cpp (revision 14118)
+++ scribus/pageitem_textframe.cpp (revision 14119)
@@ -2754,18 +2754,18 @@
QString cr, Tcha, Twort;
uint Tcoun;
int len, pos;
- int KeyMod=0;
+ int keyModifiers=0;
Qt::KeyboardModifiers buttonModifiers = k->modifiers();
if (k->modifiers() & Qt::ShiftModifier)
- KeyMod |= Qt::SHIFT;
+ keyModifiers |= Qt::SHIFT;
if (k->modifiers() & Qt::ControlModifier)
- KeyMod |= Qt::CTRL;
+ keyModifiers |= Qt::CTRL;
if (k->modifiers() & Qt::AltModifier)
- KeyMod |= Qt::ALT;
+ keyModifiers |= Qt::ALT;
//<< ISO 14755
//Check if we are trying to enter Unicode sequence mode first
- QKeySequence currKeySeq = QKeySequence(k->key() | KeyMod);
+ QKeySequence currKeySeq = QKeySequence(k->key() | keyModifiers);
if(currKeySeq.matches(doc()->scMW()->scrActions["specialUnicodeSequenceBegin"]->shortcut())==QKeySequence::ExactMatch)
{
unicodeTextEditMode = true;
@@ -3154,7 +3154,7 @@
break;
default:
bool doUpdate = false;
- if ((itemText.lengthOfSelection() > 0) && (kk < 0x1000))
+ if ((itemText.lengthOfSelection() > 0) && (kk < 0x1000 && keyModifiers == 0))
{
deleteSelectedTextFromFrame();
doUpdate = true;
More information about the scribus-commit
mailing list