r14125 by cbradney - #7798: Better fix that detects the unicode output from the keypress

scribus-commit scribus-commit at lists.scribus.net
Thu Oct 8 23:45:29 CEST 2009


Revision: 14125
Author: cbradney
Date: 2009-10-08T21:10:44.170615Z
Commit message: #7798: Better fix that detects the unicode output from the keypress

Changeset: 
M  /branches/Version135/Scribus/scribus/pageitem_textframe.cpp

Diffs:
Index: scribus/pageitem_textframe.cpp
===================================================================
--- scribus/pageitem_textframe.cpp	(revision 14124)
+++ scribus/pageitem_textframe.cpp	(revision 14125)
@@ -3154,10 +3154,20 @@
 		break;
 	default:
 		bool doUpdate = false;
-		if ((itemText.lengthOfSelection() > 0) && (kk < 0x1000 && keyModifiers == 0))
+		if (itemText.lengthOfSelection() > 0) // && (kk < 0x1000)
 		{
-			deleteSelectedTextFromFrame();
-			doUpdate = true;
+			if (!k->text().isEmpty())
+			{
+				deleteSelectedTextFromFrame();
+				doUpdate = true;
+			}
+			/*
+			qDebug()<<"Text:"<<k->text();
+			qDebug()<<"Modifiers:"<<k->modifiers();
+			qDebug()<<"Native Modifiers:"<<k->nativeModifiers();
+			qDebug()<<"Native Scan Code:"<<k->nativeScanCode();
+			qDebug()<<"Native Virtual Key:"<<k->nativeVirtualKey();
+			*/
 		}
 		//if ((kk == Qt::Key_Tab) || ((kk == Qt::Key_Return) && (buttonState & Qt::ShiftButton)))
 		if (kk == Qt::Key_Tab)




More information about the scribus-commit mailing list