diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/text_edit.cpp | 7 | ||||
-rw-r--r-- | scene/gui/text_edit.h | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 05e49a5104..e268375c8a 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -3507,6 +3507,13 @@ void TextEdit::_push_current_op() { } +void TextEdit::set_tab_size(const int p_size) { + ERR_FAIL_COND(p_size <= 0); + tab_size = p_size; + text.set_tab_size(p_size); + update(); +} + void TextEdit::set_draw_tabs(bool p_draw) { draw_tabs=p_draw; diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index 207d6eb131..d38c57804d 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -379,7 +379,7 @@ public: void redo(); void clear_undo_history(); - + void set_tab_size(const int p_size); void set_draw_tabs(bool p_draw); bool is_drawing_tabs() const; |