summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-07-23 18:23:06 +0200
committerGitHub <noreply@github.com>2017-07-23 18:23:06 +0200
commit380e2b96924776149bd75d2d66690bbbe6dd59f9 (patch)
tree6cfdb265964781f1ce8d932b4daaa6d3d9a01da4 /editor
parentcf286ed28765606fc6834e7fdbaf5550159454b4 (diff)
parenta572eb6453facaa27860be8e936fea2a0d173e17 (diff)
Merge pull request #9794 from Noshyaar/pr-impd
Suppress get_edited_scene_root error
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_node.cpp2
-rw-r--r--editor/import_dock.cpp8
-rw-r--r--editor/import_dock.h1
3 files changed, 10 insertions, 1 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 90e9e2551a..ce55438de4 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -6210,6 +6210,8 @@ EditorNode::EditorNode() {
editor_data.set_edited_scene(0);
_update_scene_tabs();
+ import_dock->initialize_import_options();
+
{
_initializing_addons = true;
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index 24647734ce..dff36ae742 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -309,6 +309,13 @@ void ImportDock::_bind_methods() {
ClassDB::bind_method(D_METHOD("_preset_selected"), &ImportDock::_preset_selected);
}
+void ImportDock::initialize_import_options() const {
+
+ ERR_FAIL_COND(!import_opts || !params);
+
+ import_opts->edit(params);
+}
+
ImportDock::ImportDock() {
imported = memnew(LineEdit);
@@ -339,7 +346,6 @@ ImportDock::ImportDock() {
hb->add_spacer();
params = memnew(ImportDockParameters);
- import_opts->edit(params);
}
ImportDock::~ImportDock() {
diff --git a/editor/import_dock.h b/editor/import_dock.h
index fc99fcc586..171aabe407 100644
--- a/editor/import_dock.h
+++ b/editor/import_dock.h
@@ -63,6 +63,7 @@ protected:
public:
void set_edit_path(const String &p_path);
void set_edit_multiple_paths(const Vector<String> &p_paths);
+ void initialize_import_options() const;
void clear();
ImportDock();