diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-04-23 12:52:27 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-04-23 12:52:27 +0400 |
commit | 8ca9dc3cfe8fbe53ba8cd2ac2af5df9b9ff0f104 (patch) | |
tree | 063e2cf0bc4b20814787e82e3c2f0e100ae0b9a3 /source | |
parent | f69825e8e87dbb57f620c551f9fd4ff18a4585c6 (diff) |
Send NA_EDITED notifier when changing tab width in text space properties
Now text editor refresh correct and there's no more glitches with messed up
syntax highlighting.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 2e947039c16..b5b980aca5b 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -539,6 +539,15 @@ static void rna_SpaceTextEditor_text_set(PointerRNA *ptr, PointerRNA value) st->top= 0; } +static void rna_SpaceTextEditor_updateEdited(Main *bmain, Scene *scene, PointerRNA *ptr) +{ + SpaceText *st= (SpaceText*)ptr->data; + + if(st->text) + WM_main_add_notifier(NC_TEXT|NA_EDITED, st->text); +} + + /* Space Properties */ /* note: this function exists only to avoid id refcounting */ @@ -1724,7 +1733,7 @@ static void rna_def_space_text(BlenderRNA *brna) RNA_def_property_int_sdna(prop, NULL, "tabnumber"); RNA_def_property_range(prop, 2, 8); RNA_def_property_ui_text(prop, "Tab Width", "Number of spaces to display tabs with"); - RNA_def_property_update(prop, NC_TEXT|NA_EDITED, NULL); + RNA_def_property_update(prop, NC_SPACE|ND_SPACE_TEXT, "rna_SpaceTextEditor_updateEdited"); prop= RNA_def_property(srna, "font_size", PROP_INT, PROP_NONE); RNA_def_property_int_sdna(prop, NULL, "lheight"); |