r3317 - trunk/data/qcsrc/menu/item

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Jan 30 14:04:21 EST 2008


Author: div0
Date: 2008-01-30 14:04:21 -0500 (Wed, 30 Jan 2008)
New Revision: 3317

Modified:
   trunk/data/qcsrc/menu/item/inputbox.c
Log:
make Shift- or Ctrl-Backspace no longer clear input fields...; only Ctrl-Del should clear the field


Modified: trunk/data/qcsrc/menu/item/inputbox.c
===================================================================
--- trunk/data/qcsrc/menu/item/inputbox.c	2008-01-30 18:42:40 UTC (rev 3316)
+++ trunk/data/qcsrc/menu/item/inputbox.c	2008-01-30 19:04:21 UTC (rev 3317)
@@ -106,17 +106,14 @@
 			me.cursorPos = strlen(me.text);
 			return 1;
 		case K_BACKSPACE:
-			if(shift)
-				me.setText(me, "");
-			else
-				if(me.cursorPos > 0)
-				{
-					me.cursorPos -= 1;
-					me.setText(me, strcat(substring(me.text, 0, me.cursorPos), substring(me.text, me.cursorPos + 1, strlen(me.text) - me.cursorPos - 1)));
-				}
+			if(me.cursorPos > 0)
+			{
+				me.cursorPos -= 1;
+				me.setText(me, strcat(substring(me.text, 0, me.cursorPos), substring(me.text, me.cursorPos + 1, strlen(me.text) - me.cursorPos - 1)));
+			}
 			return 1;
 		case K_DEL:
-			if(shift)
+			if(shift & S_CTRL)
 				me.setText(me, "");
 			else
 				me.setText(me, strcat(substring(me.text, 0, me.cursorPos), substring(me.text, me.cursorPos + 1, strlen(me.text) - me.cursorPos - 1)));




More information about the nexuiz-commits mailing list