[Bf-blender-cvs] [f469cbe] master: Followup for numinput: activate numinput when hitting pad* or =, this is the expected behavior from users!

Bastien Montagne noreply at git.blender.org
Sat Feb 22 15:03:40 CET 2014


Commit: f469cbea9df6a00aa5f406c2b0fa311c81c8b738
Author: Bastien Montagne
Date:   Sat Feb 22 15:02:49 2014 +0100
https://developer.blender.org/rBf469cbea9df6a00aa5f406c2b0fa311c81c8b738

Followup for numinput: activate numinput when hitting pad* or =, this is the expected behavior from users!

===================================================================

M	source/blender/editors/util/numinput.c

===================================================================

diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c
index 4260433..9cbea14 100644
--- a/source/blender/editors/util/numinput.c
+++ b/source/blender/editors/util/numinput.c
@@ -48,6 +48,12 @@
 #include "UI_interface.h"
 
 
+/* NumInput.flag */
+enum {
+	/* (1 << 8) and below are reserved for public flags! */
+	NUM_EDIT_FULL       = (1 << 9),   /* Enable full editing, with units and math operators support. */
+};
+
 /* NumInput.val_flag[] */
 enum {
 	/* (1 << 8) and below are reserved for public flags! */
@@ -55,7 +61,6 @@ enum {
 	NUM_INVALID         = (1 << 10),   /* Current expression for this value is invalid. */
 	NUM_NEGATE          = (1 << 11),   /* Current expression's result has to be negated. */
 	NUM_INVERSE         = (1 << 12),   /* Current expression's result has to be inverted. */
-	NUM_EDIT_FULL       = (1 << 13),   /* Enable full editing, with units and math operators support. */
 };
 
 /* ************************** Functions *************************** */
@@ -337,6 +342,7 @@ bool handleNumInput(bContext *C, NumInput *n, const wmEvent *event)
 		case PADASTERKEY:
 			if (!(n->flag & NUM_EDIT_FULL)) {
 				n->flag |= NUM_EDIT_FULL;
+				n->val_flag[idx] |= NUM_EDITED;
 				return true;
 			}
 			else if (event->ctrl) {




More information about the Bf-blender-cvs mailing list