diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-13 10:45:50 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-13 10:45:50 -0300 |
commit | 04c749a1f034c0b2256fdca0ca2675f696b490e8 (patch) | |
tree | c908a64edf3f61bba725051c8f60c6a108acbb84 /tools/editor/code_editor.cpp | |
parent | a2903fc51d1d20eba4dc451bdacbe477d6670163 (diff) | |
download | redot-engine-04c749a1f034c0b2256fdca0ca2675f696b490e8.tar.gz |
New API for visibility in both CanvasItem and Spatial
visible (property) - access set_visible(bool) is_visible()
is_visible_in_tree() - true when visible and parents visible
show() hide() - for convenience
Diffstat (limited to 'tools/editor/code_editor.cpp')
-rw-r--r-- | tools/editor/code_editor.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp index 0d7dc558ac..343070375d 100644 --- a/tools/editor/code_editor.cpp +++ b/tools/editor/code_editor.cpp @@ -91,7 +91,7 @@ void FindReplaceBar::_notification(int p_what) { } else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) { - set_process_unhandled_input(is_visible()); + set_process_unhandled_input(is_visible_in_tree()); } } @@ -377,7 +377,7 @@ void FindReplaceBar::popup_search() { void FindReplaceBar::popup_replace() { - if (!replace_hbc->is_visible() || !replace_options_hbc->is_visible()) { + if (!replace_hbc->is_visible_in_tree() || !replace_options_hbc->is_visible_in_tree()) { replace_text->clear(); replace_hbc->show(); replace_options_hbc->show(); @@ -396,7 +396,7 @@ void FindReplaceBar::_search_options_changed(bool p_pressed) { void FindReplaceBar::_editor_text_changed() { - if (is_visible()) { + if (is_visible_in_tree()) { preserve_cursor=true; search_current(); preserve_cursor=false; @@ -801,7 +801,7 @@ void FindReplaceDialog::_skip_pressed() { bool FindReplaceDialog::is_replace_mode() const { - return replace_text->is_visible(); + return replace_text->is_visible_in_tree(); } bool FindReplaceDialog::is_replace_all_mode() const { @@ -826,7 +826,7 @@ void FindReplaceDialog::ok_pressed() { void FindReplaceDialog::_search_text_entered(const String& p_text) { - if (replace_text->is_visible()) + if (replace_text->is_visible_in_tree()) return; emit_signal("search"); _search(); @@ -835,7 +835,7 @@ void FindReplaceDialog::_search_text_entered(const String& p_text) { void FindReplaceDialog::_replace_text_entered(const String& p_text) { - if (!replace_text->is_visible()) + if (!replace_text->is_visible_in_tree()) return; emit_signal("search"); @@ -1061,7 +1061,7 @@ void CodeTextEditor::_text_changed() { } void CodeTextEditor::_code_complete_timer_timeout() { - if (!is_visible()) + if (!is_visible_in_tree()) return; if (enable_complete_timer) text_editor->query_code_comple(); |