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.
This commit is contained in:
@@ -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");
|
||||
|
Reference in New Issue
Block a user