diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2010-09-15 08:42:01 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2010-09-15 08:42:01 +0400 |
commit | e2a0b302ffc7e70fc99b58eafb247adc95863128 (patch) | |
tree | ae4a7debceef7b05d31c2555c92bfff64dc37823 | |
parent | d2a12182102aecb9a3d4987dd126776f4d560a55 (diff) |
Logic UI: reset the value of a key when clicking outside the input button
Otherwise you had no way to set it to none. This doesn't really matter, but it's nice "userwise" to be able to clear the pressed key.
-rw-r--r-- | source/blender/makesrna/intern/rna_sensor.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c index d20e5aebcfb..6dddb042533 100644 --- a/source/blender/makesrna/intern/rna_sensor.c +++ b/source/blender/makesrna/intern/rna_sensor.c @@ -156,6 +156,8 @@ static void rna_Sensor_keyboard_key_set(struct PointerRNA *ptr, int value) if (ISKEYBOARD(value)) ks->key = value; + else + ks->key = 0; } static void rna_Sensor_keyboard_modifier_set(struct PointerRNA *ptr, int value) @@ -165,6 +167,8 @@ static void rna_Sensor_keyboard_modifier_set(struct PointerRNA *ptr, int value) if (ISKEYBOARD(value)) ks->qual = value; + else + ks->qual = 0; } static void rna_Sensor_keyboard_modifier2_set(struct PointerRNA *ptr, int value) @@ -174,6 +178,8 @@ static void rna_Sensor_keyboard_modifier2_set(struct PointerRNA *ptr, int value) if (ISKEYBOARD(value)) ks->qual2 = value; + else + ks->qual2 = 0; } static void rna_Sensor_tap_set(struct PointerRNA *ptr, int value) |