Fix code completion drawing under other gui elements.

Raises the z-index of the Script editor when the completion is shown.

fixes #1257
fixes #6690
This commit is contained in:
Andreas Haas 2016-10-05 10:19:08 +02:00
parent 1f9e16119f
commit 6dfa405eac
No known key found for this signature in database
GPG Key ID: B5FFAE1B65FBD2E1

View File

@ -4197,12 +4197,15 @@ void TextEdit::_confirm_completion() {
void TextEdit::_cancel_code_hint() {
VisualServer::get_singleton()->canvas_item_set_z(get_canvas_item(), 0);
completion_hint="";
update();
}
void TextEdit::_cancel_completion() {
VisualServer::get_singleton()->canvas_item_set_z(get_canvas_item(), 0);
if (!completion_active)
return;
@ -4382,6 +4385,7 @@ void TextEdit::query_code_comple() {
void TextEdit::set_code_hint(const String& p_hint) {
VisualServer::get_singleton()->canvas_item_set_z(get_canvas_item(), 1);
completion_hint=p_hint;
completion_hint_offset=-0xFFFF;
update();
@ -4389,7 +4393,7 @@ void TextEdit::set_code_hint(const String& p_hint) {
void TextEdit::code_complete(const Vector<String> &p_strings) {
VisualServer::get_singleton()->canvas_item_set_z(get_canvas_item(), 1);
completion_strings=p_strings;
completion_active=true;
completion_current="";