r14118 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:19 CEST 2009


Revision: 14118
Author: cbradney
Date: 2009-10-08T19:06:46.429924Z
Commit message: #7798: When deleting in text edit mode by pressing a character, ensure keyboard modifiers are also not pressed

Changeset: 
M  /trunk/Scribus/scribus/pageitem_textframe.cpp

Diffs:
Index: scribus/pageitem_textframe.cpp
===================================================================
--- scribus/pageitem_textframe.cpp	(revision 14117)
+++ scribus/pageitem_textframe.cpp	(revision 14118)
@@ -2755,18 +2755,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;
@@ -3155,7 +3155,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