[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32588] trunk/blender/source/blender/ editors/interface/interface_handlers.c: patch [#24320] Fix for [#24311] Copy and Paste

Campbell Barton ideasman42 at gmail.com
Tue Oct 19 10:35:30 CEST 2010


Revision: 32588
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32588
Author:   campbellbarton
Date:     2010-10-19 10:35:30 +0200 (Tue, 19 Oct 2010)

Log Message:
-----------
patch [#24320] Fix for [#24311] Copy and Paste
from Alexander Kuznetsov (alexk)

   This check was dubious to begin with, if it causes more problems it should be removed.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/interface/interface_handlers.c

Modified: trunk/blender/source/blender/editors/interface/interface_handlers.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_handlers.c	2010-10-19 07:23:34 UTC (rev 32587)
+++ trunk/blender/source/blender/editors/interface/interface_handlers.c	2010-10-19 08:35:30 UTC (rev 32588)
@@ -4281,7 +4281,12 @@
 	if(but->flag & UI_BUT_DISABLED)
 		return WM_UI_HANDLER_CONTINUE;
 
-	if(data->state == BUTTON_STATE_HIGHLIGHT && event->prevval != KM_PRESS) { /* check prevval because of modal operators [#24016] */
+	if(	(data->state == BUTTON_STATE_HIGHLIGHT) &&
+		/* check prevval because of modal operators [#24016],
+		 * modifier check is to allow Ctrl+C for copy.
+		 * if this causes other problems, remove this check and suffer the bug :) - campbell */
+		(event->prevval != KM_PRESS || ISKEYMODIFIER(event->prevtype))
+	) {
 		/* handle copy-paste */
 		if(ELEM(event->type, CKEY, VKEY) && event->val==KM_PRESS && (event->ctrl || event->oskey)) {
 			ui_but_copy_paste(C, but, data, (event->type == CKEY)? 'c': 'v');





More information about the Bf-blender-cvs mailing list