From 5cbab8156477e107405e997cda024d1185b1933b Mon Sep 17 00:00:00 2001 From: qarmin Date: Mon, 6 Apr 2020 20:07:08 +0200 Subject: [PATCH] Fixes leaks when running editor --- editor/editor_file_dialog.cpp | 1 + scene/gui/dialogs.cpp | 1 - scene/gui/file_dialog.cpp | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 71ade56e390..760bf572efb 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -1579,6 +1579,7 @@ EditorFileDialog::EditorFileDialog() { drives = memnew(OptionButton); drives->connect("item_selected", callable_mp(this, &EditorFileDialog::_select_drive)); + pathhb->add_child(drives); makedir = memnew(Button); makedir->set_text(TTR("Create Folder")); diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index 2e87a929698..5654219a3ea 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -322,7 +322,6 @@ AcceptDialog::AcceptDialog() { label->set_end(Point2(-margin, -button_margin - 10)); add_child(label); - hbc = memnew(HBoxContainer); add_child(hbc); hbc->add_spacer(); diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index 905af399b32..3d0812e9918 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -909,6 +909,7 @@ FileDialog::FileDialog() { drives = memnew(OptionButton); drives->connect("item_selected", callable_mp(this, &FileDialog::_select_drive)); + hbc->add_child(drives); dir = memnew(LineEdit); hbc->add_child(dir);