Revision: 36294
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36294
Author:   nazgul
Date:     2011-04-23 08:52:27 +0000 (Sat, 23 Apr 2011)
Log Message:
-----------
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.

Modified Paths:
--------------
    trunk/blender/source/blender/makesrna/intern/rna_space.c

Modified: trunk/blender/source/blender/makesrna/intern/rna_space.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_space.c    2011-04-23 
08:30:28 UTC (rev 36293)
+++ trunk/blender/source/blender/makesrna/intern/rna_space.c    2011-04-23 
08:52:27 UTC (rev 36294)
@@ -539,6 +539,15 @@
        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 @@
        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");

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to