summaryrefslogtreecommitdiff
path: root/editor/editor_sub_scene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_sub_scene.cpp')
-rw-r--r--editor/editor_sub_scene.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/editor/editor_sub_scene.cpp b/editor/editor_sub_scene.cpp
index 3ebd8f0475..1205e0b37c 100644
--- a/editor/editor_sub_scene.cpp
+++ b/editor/editor_sub_scene.cpp
@@ -46,7 +46,7 @@ void EditorSubScene::_path_changed(const String &p_path) {
if (scene) {
memdelete(scene);
- scene = NULL;
+ scene = nullptr;
}
if (p_path == "")
@@ -61,7 +61,7 @@ void EditorSubScene::_path_changed(const String &p_path) {
if (!scene)
return;
- _fill_tree(scene, NULL);
+ _fill_tree(scene, nullptr);
}
void EditorSubScene::_path_browse() {
@@ -70,11 +70,11 @@ void EditorSubScene::_path_browse() {
}
void EditorSubScene::_notification(int p_what) {
-
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
- if (is_visible() && scene == NULL)
+ if (is_visible() && scene == nullptr) {
_path_browse();
+ }
}
}
@@ -209,7 +209,7 @@ void EditorSubScene::move(Node *p_new_parent, Node *p_new_owner) {
if (!is_root) {
memdelete(scene);
}
- scene = NULL;
+ scene = nullptr;
//return selnode;
}
@@ -226,7 +226,7 @@ void EditorSubScene::_bind_methods() {
EditorSubScene::EditorSubScene() {
- scene = NULL;
+ scene = nullptr;
is_root = false;
set_title(TTR("Select Node(s) to Import"));
@@ -240,7 +240,7 @@ EditorSubScene::EditorSubScene() {
path = memnew(LineEdit);
path->connect("text_entered", callable_mp(this, &EditorSubScene::_path_changed));
hb->add_child(path);
- path->set_h_size_flags(SIZE_EXPAND_FILL);
+ path->set_h_size_flags(Control::SIZE_EXPAND_FILL);
Button *b = memnew(Button);
b->set_text(TTR("Browse"));
hb->add_child(b);
@@ -248,7 +248,7 @@ EditorSubScene::EditorSubScene() {
vb->add_margin_child(TTR("Scene Path:"), hb);
tree = memnew(Tree);
- tree->set_v_size_flags(SIZE_EXPAND_FILL);
+ tree->set_v_size_flags(Control::SIZE_EXPAND_FILL);
vb->add_margin_child(TTR("Import From Node:"), tree, true);
tree->set_select_mode(Tree::SELECT_MULTI);
tree->connect("multi_selected", callable_mp(this, &EditorSubScene::_item_multi_selected));
@@ -266,7 +266,7 @@ EditorSubScene::EditorSubScene() {
file_dialog->add_filter("*." + E->get());
}
- file_dialog->set_mode(EditorFileDialog::MODE_OPEN_FILE);
+ file_dialog->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
add_child(file_dialog);
file_dialog->connect("file_selected", callable_mp(this, &EditorSubScene::_path_selected));
}