diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-07-23 18:23:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-23 18:23:06 +0200 |
commit | 380e2b96924776149bd75d2d66690bbbe6dd59f9 (patch) | |
tree | 6cfdb265964781f1ce8d932b4daaa6d3d9a01da4 /editor | |
parent | cf286ed28765606fc6834e7fdbaf5550159454b4 (diff) | |
parent | a572eb6453facaa27860be8e936fea2a0d173e17 (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.cpp | 2 | ||||
-rw-r--r-- | editor/import_dock.cpp | 8 | ||||
-rw-r--r-- | editor/import_dock.h | 1 |
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(); |