diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-06-12 14:23:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-12 14:23:27 +0200 |
commit | df2567923551132c4835192bd856ecf07af1fe51 (patch) | |
tree | 0596457535291fa1e1b84749461b414972f02559 | |
parent | 1e5a02f0062b6bbf2edb27151319c6ec4d6a1762 (diff) | |
parent | e4f90337f29ab8cc3683921c3f78987ce1c3166b (diff) |
Merge pull request #29601 from NilsIrl/hiding_enabled
Treat hiding_enabled as bool throughout
-rw-r--r-- | doc/classes/TextEdit.xml | 2 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 4 | ||||
-rw-r--r-- | scene/gui/text_edit.h | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 62e8a2c34f..8ca553ccb8 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -391,7 +391,7 @@ <member name="fold_gutter" type="bool" setter="set_draw_fold_gutter" getter="is_drawing_fold_gutter"> If [code]true[/code], the fold gutter is visible. This enables folding groups of indented lines. </member> - <member name="hiding_enabled" type="int" setter="set_hiding_enabled" getter="is_hiding_enabled"> + <member name="hiding_enabled" type="bool" setter="set_hiding_enabled" getter="is_hiding_enabled"> </member> <member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled"> </member> diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 53035fbb9b..6b40ecfc6b 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -6344,14 +6344,14 @@ int TextEdit::get_info_gutter_width() const { return info_gutter_width; } -void TextEdit::set_hiding_enabled(int p_enabled) { +void TextEdit::set_hiding_enabled(bool p_enabled) { if (!p_enabled) unhide_all_lines(); hiding_enabled = p_enabled; update(); } -int TextEdit::is_hiding_enabled() const { +bool TextEdit::is_hiding_enabled() const { return hiding_enabled; } diff --git a/scene/gui/text_edit.h b/scene/gui/text_edit.h index 68e590f1e6..0c26602d2b 100644 --- a/scene/gui/text_edit.h +++ b/scene/gui/text_edit.h @@ -697,8 +697,8 @@ public: void set_info_gutter_width(int p_gutter_width); int get_info_gutter_width() const; - void set_hiding_enabled(int p_enabled); - int is_hiding_enabled() const; + void set_hiding_enabled(bool p_enabled); + bool is_hiding_enabled() const; void set_tooltip_request_func(Object *p_obj, const StringName &p_function, const Variant &p_udata); |