r14137 by cbradney - Add X11/Control Char hack to 1.3.6svn

scribus-commit scribus-commit at lists.scribus.net
Sun Oct 11 00:55:18 CEST 2009


Revision: 14137
Author: cbradney
Date: 2009-10-10T22:00:49.776541Z
Commit message: Add X11/Control Char hack to 1.3.6svn

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

Diffs:
Index: scribus/pageitem_textframe.cpp
===================================================================
--- scribus/pageitem_textframe.cpp	(revision 14136)
+++ scribus/pageitem_textframe.cpp	(revision 14137)
@@ -3156,13 +3156,23 @@
 		bool doUpdate = false;
 		if (itemText.lengthOfSelection() > 0) // && (kk < 0x1000)
 		{
-			if (!k->text().isEmpty())
+			bool x11Hack=false;
+			bool controlCharHack=false;
+			if ((k->text().size()==1) && (k->text().at(0).unicode()<32))
+				controlCharHack=true;
+#if defined (Q_WS_X11)
+			if ((k->text().size()==1) && (k->modifiers() & Qt::ShiftModifier) && (k->modifiers() & Qt::ControlModifier) && (k->nativeVirtualKey() < 1000))
+				x11Hack=true;
+#endif
+			if (!controlCharHack && !x11Hack && !k->text().isEmpty())
 			{
 				deleteSelectedTextFromFrame();
 				doUpdate = true;
 			}
 			/*
+			qDebug()<<"Key:"<<k->key();
 			qDebug()<<"Text:"<<k->text();
+			qDebug()<<"Size:"<<k->text().size();
 			qDebug()<<"Modifiers:"<<k->modifiers();
 			qDebug()<<"Native Modifiers:"<<k->nativeModifiers();
 			qDebug()<<"Native Scan Code:"<<k->nativeScanCode();




More information about the scribus-commit mailing list