Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-10-05 22:35:02 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-10-05 22:35:02 +0400
commit458de52151994854cd3fec191fe1761bca2c88d0 (patch)
tree43077ba99243e05ac14d2227013afe8ed1e10a0f /source/blender/editors/space_console
parent5bab95fc5800d674e3e093118df0ee080020c87d (diff)
bugfix [#24148] unable to get keyboard mappings to work in the text window
this exposes another problem: RNA_property_is_set cant be used on properties set from a keymap, they are always set. for now check for string length.
Diffstat (limited to 'source/blender/editors/space_console')
-rw-r--r--source/blender/editors/space_console/console_ops.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/space_console/console_ops.c b/source/blender/editors/space_console/console_ops.c
index 8ececa22163..3f04d0e4293 100644
--- a/source/blender/editors/space_console/console_ops.c
+++ b/source/blender/editors/space_console/console_ops.c
@@ -403,8 +403,14 @@ static int insert_exec(bContext *C, wmOperator *op)
static int insert_invoke(bContext *C, wmOperator *op, wmEvent *event)
{
- if(!RNA_property_is_set(op->ptr, "text")) {
+ // if(!RNA_property_is_set(op->ptr, "text")) { /* always set from keymap XXX */
+ if(!RNA_string_length(op->ptr, "text")) {
char str[2] = {event->ascii, '\0'};
+
+ /* if alt/ctrl/super are pressed pass through */
+ if(event->alt || event->ctrl || event->oskey)
+ return OPERATOR_PASS_THROUGH;
+
RNA_string_set(op->ptr, "text", str);
}
return insert_exec(C, op);