diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-01-04 18:12:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-01-04 18:13:06 +0400 |
commit | 0a3ce15ce3c9eb1bed87eafdd2cfc4f37f40ad9f (patch) | |
tree | 0e02c2f0a0eb0f232238941bb006e1cb0e05509e /source/blender/makesrna/intern/rna_text_api.c | |
parent | 1f2aec71b40b00324255c33e6d4f347614c50f42 (diff) |
Revert "Quick fix for system info text always being scrolled out of view when loaded for the first time"
This can be done without extending the API, using RNA access instead.
Diffstat (limited to 'source/blender/makesrna/intern/rna_text_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_text_api.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/source/blender/makesrna/intern/rna_text_api.c b/source/blender/makesrna/intern/rna_text_api.c index 4d88430fab0..de398bc10a6 100644 --- a/source/blender/makesrna/intern/rna_text_api.c +++ b/source/blender/makesrna/intern/rna_text_api.c @@ -50,20 +50,6 @@ static void rna_Text_write(Text *text, const char *str) WM_main_add_notifier(NC_TEXT | NA_EDITED, text); } -static void rna_Text_jump(Text *text, int line) -{ - short nlines = txt_get_span(text->lines.first, text->lines.last) + 1; - - if (line < 1) - txt_move_toline(text, 1, 0); - else if (line > nlines) - txt_move_toline(text, nlines - 1, 0); - else - txt_move_toline(text, line - 1, 0); - - WM_main_add_notifier(NC_TEXT | ND_CURSOR, text); -} - #else void RNA_api_text(StructRNA *srna) @@ -75,15 +61,9 @@ void RNA_api_text(StructRNA *srna) RNA_def_function_ui_description(func, "clear the text block"); func = RNA_def_function(srna, "write", "rna_Text_write"); - RNA_def_function_ui_description(func, "Write text at the cursor location and advance to the end of the text block"); + RNA_def_function_ui_description(func, "write text at the cursor location and advance to the end of the text block"); prop = RNA_def_string(func, "text", "Text", 0, "", "New text for this datablock"); RNA_def_property_flag(prop, PROP_REQUIRED); - - func = RNA_def_function(srna, "jump", "rna_Text_jump"); - RNA_def_function_ui_description(func, "Move cursor location to the start of the specified line"); - prop = RNA_def_int(func, "line_number", 1, 1, INT_MAX, "Line", "Line number to jump to", 1, 10000); - RNA_def_property_flag(prop, PROP_REQUIRED); - /* TODO: include optional parameter for character on line to jump to? */ } #endif |