summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/text_edit.cpp7
-rw-r--r--scene/gui/text_edit.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 32f4be5d17..503aa5de98 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -3495,6 +3495,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 2eff8e89c7..ac8136cd8b 100644
--- a/scene/gui/text_edit.h
+++ b/scene/gui/text_edit.h
@@ -378,7 +378,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;